|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Strict delivery of mq messages through transmission queue |
« View previous topic :: View next topic » |
Author |
Message
|
MABeatty1978 |
Posted: Fri Jul 14, 2017 9:58 am Post subject: Strict delivery of mq messages through transmission queue |
|
|
Acolyte
Joined: 17 Jul 2014 Posts: 54
|
Is there a way to force strict sequential delivery of messages to a remote queue through a transmission queue? So that if messages 1, 2, 3, 4 are all put on a que, they are ensured to show up on the remote que in 1,2,3,4 order? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 14, 2017 10:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Yes - put them in a group and specify "logical sequence" in the get.
If you mean "can we enforce that every message, even with no relationship to each other, sent from now until the end of time, arrives in the order it was put?" then no you can't and you've just discovered why message affinity is a really bad design concept. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Jul 14, 2017 7:35 pm Post subject: Re: Strict delivery of mq messages through transmission queu |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
MABeatty1978 wrote: |
Is there a way to force strict sequential delivery of messages to a remote queue through a transmission queue? So that if messages 1, 2, 3, 4 are all put on a que, they are ensured to show up on the remote que in 1,2,3,4 order? |
No, not really. What if one or more of the messages can't be delivered to the destination queue on the remote qmgr, and end up on the dead-letter queue? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Jul 16, 2017 3:48 pm Post subject: Re: Strict delivery of mq messages through transmission queu |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
MABeatty1978 wrote: |
Is there a way to force strict sequential delivery of messages to a remote queue through a transmission queue? So that if messages 1, 2, 3, 4 are all put on a que, they are ensured to show up on the remote que in 1,2,3,4 order? |
It may be possible, but you should never design an application that relies on strict delivery order of MQ messages. MQ is not built around this paradigm. If you need sequencing in your application, use marshalling techniques such as inserting the messages in a DB and the retrieve in the desired order. The app logic needs to allow for delayed messages or messages arriving in advance. _________________ Glenn |
|
Back to top |
|
 |
PaulClarke |
Posted: Sun Jul 16, 2017 8:42 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
In most cases it should not be necessary to use a DB. As Vitor says you can just put them in a message group and ask your local Queue Manager to give them to you in the right order. Or, a more low-tech solution is just to out the data to one queue and have the 'command' sent to your processing queue. When you get 'command' you just retrieve the messages from the data queue in the right order. Clearly you would need some retry logic to cope with missing messages etc.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Jul 17, 2017 8:35 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Please take some time to research 'mq assured message delivery'. Note that it is not 'guaranteed message delivery.'
An MQ MessageGroup is a programming option, but it does NOT guarantee delivery of messages to the destination queue (see my dead-letter queue reference above).
A requesting/producing application must be written to create a MessageGroup with a unique GroupId, and MQPUT messages within the MessageGroup, specifying the GroupId and MessageGroup flags.
The replying/consuming application must be written to MQGET messages that the producing app MQPUT within the MessageGroup, by specifying the GroupId, and MessageGroup flags. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Jul 17, 2017 4:44 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Message groups do not allow for infinite processing of a stream of messages that contain sequencing data, such as transaction number, or a phase sequence number within a transaction.
In many cases where Message groups could be used, it is actually easier to design a solution that combines the data into one larger message. However, the 100MB ceiling is a hard limitation. _________________ Glenn |
|
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
|
|
|
|