Author |
Message
|
srinivasraom |
Posted: Mon Jan 08, 2007 7:17 am Post subject: An MQ Trigger Problem Scenario |
|
|
Apprentice
Joined: 18 May 2006 Posts: 31
|
I have two queue managers(qm1, qm2), one among them(qm2) is remote.
I have trigger associated with my qm1 queue, which will put messages directly to the qm2 queue.
In this scenario, if qm2 gone down, and message came to qm1 queue. Trigger will fire and try connecting to qm2. It will fail. Then the message will backed out the same queue i.e qm1 queue.
Now qm2 is up. But the message wont be consumed from qm1 queue.
If a second message comes then only the previous message will also consumed as all together. If second message wont come for one week my first message will held up in the queue. Which is not a right behaviour.
In IBM MQ API is there any way to handle this situation?
Thanks
Srini |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jan 08, 2007 7:25 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why are you duplicating the logic of an MCA? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 08, 2007 7:26 am Post subject: Re: An MQ Trigger Problem Scenario |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
srinivasraom wrote: |
In IBM MQ API is there any way to handle this situation?
|
Yes. Don't put directly to the qm2 queue - put to a remote queue on qm1. Then when qm2 is down the message will sit on the transmission queue and be automatically delivered when qm2 comes back up.
The Intercommunication manual explains all this. Fairly early on in the book.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 08, 2007 7:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jefflowrey wrote: |
Why are you duplicating the logic of an MCA? |
Alright, sum up my post in one beautifully simple comment then...  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jan 08, 2007 7:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Vitor wrote: |
jefflowrey wrote: |
Why are you duplicating the logic of an MCA? |
Alright, sum up my post in one beautifully simple comment then...  |
I think your phrasing was more helpful, though. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 08, 2007 7:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jefflowrey wrote: |
Vitor wrote: |
jefflowrey wrote: |
Why are you duplicating the logic of an MCA? |
Alright, sum up my post in one beautifully simple comment then...  |
I think your phrasing was more helpful, though. |
Possibly, but yours had a simplicity that must be admired. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
srinivasraom |
Posted: Mon Jan 08, 2007 4:31 pm Post subject: |
|
|
Apprentice
Joined: 18 May 2006 Posts: 31
|
In my qm1 and qm2 I have 30 queues for 30 countries.
As per you suggetion I need to create 30 remote queues at qm1.
The messages per day will be 1000 to 2000 per queue, all messages have to go through new remote queue at qm1.
This approach may have Performance impact. |
|
Back to top |
|
 |
pathipati |
Posted: Mon Jan 08, 2007 5:30 pm Post subject: |
|
|
Master
Joined: 03 Mar 2006 Posts: 296
|
|
Back to top |
|
 |
srinivasraom |
Posted: Mon Jan 08, 2007 5:49 pm Post subject: |
|
|
Apprentice
Joined: 18 May 2006 Posts: 31
|
why we are doing like this , we need to maintain same message id in both the queue managers. |
|
Back to top |
|
 |
pathipati |
Posted: Mon Jan 08, 2007 5:59 pm Post subject: |
|
|
Master
Joined: 03 Mar 2006 Posts: 296
|
Why do you think you are not maintaining same message ID? |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jan 08, 2007 6:08 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
srinivasraom wrote: |
As per you suggetion I need to create 30 remote queues at qm1. |
No.
You can change your application so that it specifies the destination queue manager as well as the destination queue when it performs the Open, then you won't need the remote queue.
Or you can create a queue manager alias, and the application can specify that instead of specifying the actual queue manager name.
Regardless, it is an extra step that you do not need and is another place that something will go wrong to write messages to a local queue and then manually move them to other queue managers.
In addition, the proper thing to do when an application is started by a trigger is for the application to always read every message that's on the queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|