Author |
Message
|
tcanani |
Posted: Tue Nov 20, 2007 7:56 am Post subject: Duplicate Queue |
|
|
Newbie
Joined: 20 Nov 2007 Posts: 2
|
Hi there.
I`m looking for way to duplicate a queue in the WMQ and wondering if some of you could help me, or passed through similar problem. Let me try to explain better.
I have two applications comunicating to each other through MQ. My problems is that i have a correct order to process the messages, so i need MQ to duplicate the message that my app puts into the queue into another queue so i can verify in wich side is the problem, if is the app that puts the message on the queue who says it`s ok but it isn`t, or if is the get side that is not getting the message and says it`s ok.
I appreciate some help.
P.S.: I hope my english is at least "understandable"
[]`s |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 20, 2007 8:10 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
If all you want are 2 identical copies of the delivered message, search the forum for discussions about the mirrorq exit.
Be aware the exits are not a straightforward topic, can cause immense problems, and you might be better off coding such logic in your application. 2 messages that have to be processed in a specific order is called "message affinity" and there have been numerous discussions on why that's a bad idea. Use groups or store messages received out of sequence.
If that's not what you want, please accept my apologies and rephrase your question! _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
tcanani |
Posted: Tue Nov 20, 2007 9:32 am Post subject: |
|
|
Newbie
Joined: 20 Nov 2007 Posts: 2
|
Hi Vitor,
First of all, thanks for your reply.
Yes, i need a copy of a message delivered by the application on another queue, that`s it.
But only one, the original, will be processed. The other one is just like a log of wich message was delivered in what order, if you know what i mean.
As the specific order of the processing of the messages, they`ll be putted in the same queue, but i have to put them in one order and get it in the same order. It`s not happening sometimes and i need to know why. If i can copy these messages in the exact order they were putted on the queue by the app to another test queue, i`ll know if the problem is the put or the get.
I made a test creating a test queue and using AMQSPTL for distribution lists, but it only works when i put the message by these sample, it doesn`t work when is my app putting the message on the queue.
I will try out this mirrorq exit, i never heard 'bout it but i`ll look for it on the forum.
Thanks a lot, and if you know something else, please reply. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 20, 2007 9:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You can also have the sending app put to Q1, the getting app get from Q3.
Now all you need is to write a little program that gets from Q1 and puts to Q2 & Q3 (or a Distribution list)...
Q2 is your original sequence.....
Enjoy
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 20, 2007 11:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
Now all you need is to write a little program that gets from Q1 and puts to Q2 & Q3 (or a Distribution list)...
|
If all you're looking for is some diagnostic and not an ongoing requirement then this is a much better solution; easier & faster to implement. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
SAFraser |
Posted: Wed Nov 21, 2007 8:25 am Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
Could you do something as simple as stop your receiving application and send amqsbcg output to a text file? Then start the receiving application?
Your requirement may be much more sophisticated than that, but I mention it just in case it might be useful. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Nov 21, 2007 9:34 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
fjb_saper wrote: |
You can also have the sending app put to Q1, the getting app get from Q3.
Now all you need is to write a little program that gets from Q1 and puts to Q2 & Q3 (or a Distribution list) |
Go get MMX (Message Multiplexer) from the following web page:
http://www.capitalware.biz/mq_code_c.html
I wrote it many, many years ago to do exactly what you described.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
dkeister |
Posted: Wed Nov 21, 2007 9:55 am Post subject: |
|
|
Disciple
Joined: 25 Mar 2002 Posts: 184 Location: Purchase, New York
|
MQExerciser will allow you to simply move or copy messages from one queue to multiple queues if that meets your requirement. _________________ Dean Keister |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Nov 21, 2007 10:00 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
dkeister wrote: |
MQExerciser will allow you to simply move or copy messages from one queue to multiple queues if that meets your requirement. |
So Dean, when are you going to become a sponsor of mqseries.net ?
Secondly, his question appears to be about a permanent solution not a temporary one-off situation.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
dkeister |
Posted: Wed Nov 21, 2007 10:04 am Post subject: |
|
|
Disciple
Joined: 25 Mar 2002 Posts: 184 Location: Purchase, New York
|
I'll probably try to become one when I stop giving MQExerciser away for free.
As to the point about permanent vs one-off, thanks for clarifying. MQExerciser is intended for testing, not production as it is driven from a user interface. _________________ Dean Keister |
|
Back to top |
|
 |
oconnke1 |
Posted: Thu Dec 13, 2007 3:57 pm Post subject: |
|
|
 Newbie
Joined: 04 Dec 2001 Posts: 5 Location: Los Angeles, California, USA
|
RogerLacroix wrote: |
Secondly, his question appears to be about a permanent solution not a temporary one-off situation. |
tcanani wrote: |
i have to put them in one order and get it in the same order. It`s not happening sometimes and i need to know why. |
It appears that the problem that is trying to be solved is to process the messages in the correct sequence. An easy way is to define your queue with its default Priority set to FIFO. This means "First In First Out" or in timestamp sequence. Note that I said "default" Priority. If any of the applications is setting the priority, that is the priority that MQ will used. However, if any of the applications is setting the priority, that may be the source of your problem. _________________ Keith |
|
Back to top |
|
 |
|