|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
"Parking" messages? |
« View previous topic :: View next topic » |
Author |
Message
|
egoine |
Posted: Tue May 27, 2003 8:08 am Post subject: "Parking" messages? |
|
|
Newbie
Joined: 16 Apr 2002 Posts: 6 Location: Montreal
|
Is there a simple way supported by MQ Series to "park" a message on a queue for later delivery. Like "please deliver this message in 2 minutes".
With my limited knowledge of MQ, I would use a separate Q that is only read every two minutes but I guess there might be support in MQ for "parking" messages.
I am not looking for something complex, just a simple way to do this if any exists.
It would be good if messages comming in the same queue would not be delayed waiting after the parked message, that is they should be delivered right away (I know I could use priorities, but I would prefer not to use priorities for this).
Also, I cannot simply wait two minutes before putting the message in the Q (I don't want to leave the transaction open for 2 minutes).
I couldn't find any simple way to do this but I am far from being an MQ expert.
Thanks,
mathieu |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue May 27, 2003 9:09 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Basically, no.
Practically, it depends a lot on your particular MQ setup.
What I would recommend is using a store&forward queue as you describe, and take advantage of the trigger interval parameter. Set your process up to only forward messages that are at least two minutes old, and configure the trigger interval to something like one minute. That will cause your process to be triggered every minute as long as there are messages on the queue. And it will ensure that no message is on the queue for less than 2 minutes. |
|
Back to top |
|
 |
bduncan |
Posted: Wed May 28, 2003 8:33 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
The other thing you can do, although not elegant at all, is to set the CorrelId (or one of the other MQMD parameters) to a timestamp corresponding to two minutes into the future. Your receiving application could then browse all the messages on the queue, looking for timestamps two minutes or less into the future. When it sees one, then it does an MQGET to actually retrieve it.
Ugly, but it would work. _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
zpat |
Posted: Wed May 28, 2003 10:27 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
If you want to ensure that messages for a particular target application are never less than "n" minutes old - simply write a delaying application which reads the input queue - compares the message time to the current time and if it's more than the "n" amount greater then it immediately writes the same message to the output queue.
If it's not greater than the "n" interval later, then the delaying application sleeps for the difference in the times and then writes the message to the output queue.
The target application reads the messages output from the delaying application, these messages will never be less than "n" minutes old. |
|
Back to top |
|
 |
Jesh |
Posted: Thu May 29, 2003 1:09 am Post subject: |
|
|
Novice
Joined: 09 Apr 2003 Posts: 12
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|