Author |
Message
|
mqjeff |
Posted: Thu Jul 22, 2010 5:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Also, if the intent is to produce a debug image of a message when that message is shown to be bad somehow, then the main app should either write the message to a backout/error queue, or write a debug image of the message to a file.
I do not see any good reason to duplicate messages or use two programs to do the job that should properly be done by one. |
|
Back to top |
|
 |
mitoiuv |
Posted: Thu Jul 22, 2010 5:51 am Post subject: |
|
|
 Novice
Joined: 06 Jul 2010 Posts: 20
|
The problem here is not why , I just needed to see something in the messages with another APP so I need mirrorQ to duplicate the messages on my "clone" queue.
But it seems that i'm a dummy at doing this, I have changed the mqsc file like this
Code: |
* Business application queue to be mirrored by MIRRORQ
DEFINE QLOCAL('RD92.XML.SYNC1') REPLACE +
DESCR('Business queue for MIRRORQ')
* Queue to mirror business application queue
DEFINE QLOCAL('RD92.XML.SYNC1.MIRRORQ') REPLACE +
DESCR('Mirror queue for MIRRORQ')
* Staging queue used by MIRRORQ
* Set application up to put to this queue rather
* than business application queue
DEFINE QLOCAL('RD92.XML.SYNC1.STAGEQ') REPLACE +
DESCR('Staging queue for MIRRORQ') +
* Shareable
SHARE +
* Trigger control on
TRIGGER +
* Trigger on first message
TRIGTYPE (EVERY) +
INITQ('RD92.EVTINITQ') +
PROCESS('RD92.PROCESS')
* Initiation Queue used by MIRRORQ
DEFINE QLOCAL('RD92.EVTINITQ') REPLACE +
DESCR('trigger queue for sample programs')
* Process definition to load mirrorq.exe
DEFINE PROCESS('RD92.PROCESS') REPLACE +
DESCR('Trigger process for MIRRORQ') +
USERDATA('RD92.XML.SYNC1 RD92.XML.SYNC1.MIRRORQ') +
APPLICID('/home/mitoiuv/explodeMirror/mirrorq')
|
But when i put a message on RD92.XML.SYNC1 nothing happends...why ? Who should I listen on with runmqtrm ? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 22, 2010 6:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mitoiuv wrote: |
But when i put a message on RD92.XML.SYNC1 nothing happends...why ? |
Because if you've got the latest sample of mirrorq it's not an application, it's an exit as I said before. It doesn't start with a trigger.
I also agree with my associate that there is a problem with why. At best you're using a sledgehammer to crack a nut, at worst it's going to bring your queue manager down. It's clear that you're at the start of your WMQ journey & exits are not simple nor safe. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Thu Jul 22, 2010 7:01 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
What's wrong with using one of the options I listed? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 22, 2010 7:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
What's wrong with using one of the options I listed? |
For me, nothing. Indeed any solution which doesn't involve an exit is inherently better.
But I feel compelled to answer the OP's question. Even if it's "I put this gun to my head & pulled the trigger but nothing happened. Why?", I feel it's in the spirit of the forum to mention the safety catch while pointing out the weakness in the overall strategy. Remember only the OP knows the details of his situation and must make the final choice on a solution because he has to live with it.
Or not, if the safety catch is properly released.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mitoiuv |
Posted: Thu Jul 22, 2010 7:18 am Post subject: |
|
|
 Novice
Joined: 06 Jul 2010 Posts: 20
|
I managed to see my "noob" mistake in my thinking... I managed to duplicate the messages from one queue to another, but as always a strange thing happend.... if I enter a message using amqsput let's say ME, i get the message (m?P) on the mirrored/business queue, does the mirrorq does any conversion what so ever?
PS: Thank you for telling me that this is not the "right way" , and if you know the correct/better way please tell , so I don't kill myself
Thank you |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 22, 2010 7:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mitoiuv wrote: |
does the mirrorq does any conversion what so ever? |
For what I hope is the last time, mirrorq is a sample - it does what you code it to do. As supplied I don't believe it does anything but depending on how you've edited / compiled / linked it could be doing anything.
mitoiuv wrote: |
PS: Thank you for telling me that this is not the "right way" , and if you know the correct/better way please tell , so I don't kill myself |
Both zpat & mqjeff have offered practical solutions to your issue.
To avoid death, don't use exits. Especially while you're a noob. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mitoiuv |
Posted: Thu Jul 22, 2010 10:08 pm Post subject: |
|
|
 Novice
Joined: 06 Jul 2010 Posts: 20
|
I understand that exits are death right now, the problem is how can I solve this ?
The thing is that this is turning into a pain , here is why I have problems with this APP
- I have to make an APP for testing that retrieves messages from a business queue without deleting them (already done that with BROWSE )
- that APP can't modified the path of the messages or the configuration of the manager in anyway
- there is another APP connected all time to the queue that I want to get messages from so it gets them first
- the APP that I made is designed so I can view/output messages that arrive in a queue so they can be view and that without any interference with the installed system.
- how can this be solved with this restrictions ???
Thank you for clearing me on this, I know that as a noob I might be looking for a fast & short way , if this can be solved in someway that I cannot see right now please tell me.
I was thinking at somekind of priority in the queue or someting like that, so I can make my APP get the messages first.
Vitor wrote: |
mitoiuv wrote: |
does the mirrorq does any conversion what so ever? |
For what I hope is the last time, mirrorq is a sample - it does what you code it to do. As supplied I don't believe it does anything but depending on how you've edited / compiled / linked it could be doing anything.
mitoiuv wrote: |
PS: Thank you for telling me that this is not the "right way" , and if you know the correct/better way please tell , so I don't kill myself |
Both zpat & mqjeff have offered practical solutions to your issue.
To avoid death, don't use exits. Especially while you're a noob. |
|
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jul 23, 2010 2:24 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You need to go back to your boss or your manager or whoever and clarify the requirements better. The ability to simultaneously have an app reading all messages from a queue, and have another app non-destructively read *the same* messages from the same queue is not possible.
So what is the goal of the testing? Is this goal properly met if you duplicate messages? Is this goal properly met if you have the "testing" app act as a message-forwarder, where it reads all messages destructively from one queue and then writes them without change to the queue that the business app is reading from? It could then have some controls to allow you to display or print the messages - again without modification.
We keep asking "why" because there isn't a solution the way you pose the problem. Or at least, there are only bad solutions. |
|
Back to top |
|
 |
mitoiuv |
Posted: Fri Jul 23, 2010 2:31 am Post subject: |
|
|
 Novice
Joined: 06 Jul 2010 Posts: 20
|
Ok, I will get back on the strategy to see how we can change it to make this work.
Thank you for your help.
I will update this thread as soon as I have updates. |
|
Back to top |
|
 |
Cressida |
Posted: Fri Jul 23, 2010 3:41 am Post subject: |
|
|
Disciple
Joined: 13 Jul 2007 Posts: 157
|
Quote: |
I was thinking at using MirrorQ to mirror that queue and read from the mirrored queue instead of the business queue
As has been said many times, mirrorq is a piece of sample code and a) is not considered production strength & b) will be your problem to maintain & fix going forward
<plug>Though Cressida does sell something that does this & supports it </plug>. |
with thanks for the Vitor plug , below is the link for the Cressida provided, production strength, multi platform, vendor supported, ..... that your manager should be told about !
http://www.cressidatechnology.com/mqproducts_synquest.html |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 23, 2010 4:11 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Cressida wrote: |
Quote: |
I was thinking at using MirrorQ to mirror that queue and read from the mirrored queue instead of the business queue
As has been said many times, mirrorq is a piece of sample code and a) is not considered production strength & b) will be your problem to maintain & fix going forward
<plug>Though Cressida does sell something that does this & supports it </plug>. |
with thanks for the Vitor plug , below is the link for the Cressida provided, production strength, multi platform, vendor supported, ..... that your manager should be told about !
http://www.cressidatechnology.com/mqproducts_synquest.html |
And to clarify my previous comment:
Quote: |
to avoid death, don't use exits |
this applies to exits which you write and maintain. With commercial exits (e.g. this Cressida & the Captialware ones) the death will rain down on the vendor when they misbehave, proving my point and highlighting why this might be the answer to your problem.
It depends on how much your management subscribes to the "shoot the messenger" strategy when you tell them the queue manager's in bits all over the bottom of the memory but the vendor's working on it.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 23, 2010 4:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
You need to go back to your boss or your manager or whoever and clarify the requirements better. The ability to simultaneously have an app reading all messages from a queue, and have another app non-destructively read *the same* messages from the same queue is not possible. |
It sounds like a classic case of management attempting to supply a solution when they should be outlining their requirement. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|