Author |
Message
|
ashish_MQ |
Posted: Thu Sep 13, 2018 11:14 pm Post subject: unit of order for IBM MQ messaging system |
|
|
Newbie
Joined: 13 Sep 2018 Posts: 3
|
HI ,
please help me in knowing whether we can process messages on IBM MQ in an specific order in which the message was written on the queue.
Similar feature is available in weblogic JMS queue i.e. UNIT OF ORDER when active wecan process message in an order in which they were written on the queue. |
|
Back to top |
|
 |
abhi_thri |
Posted: Fri Sep 14, 2018 12:03 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
|
Back to top |
|
 |
ashish_MQ |
Posted: Fri Sep 14, 2018 12:05 am Post subject: |
|
|
Newbie
Joined: 13 Sep 2018 Posts: 3
|
Thanks abhi_thri for your reply.
I am using IBM MQ 8.0 series. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Sep 14, 2018 2:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Doesn't matter which version you are using. If you are using more than a single instance of the flow, the messages can be consumed out of order.
Also if the message is transmitted over an MQ network with multiple possible routes it can be out of order to start with (arrive out of order on the queue).
You may want to look into the sequence / re-sequence nodes...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
timber |
Posted: Fri Sep 14, 2018 3:00 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Before mqjeff comes along and says it...if at all possible, you should avoid this type of requirement. It is called 'message affinity' because it links the processing of a message to the processing of other messages.
Message affinity introduces a single-threaded bottleneck in your processing pathway and there is almost always a better alternative. IBM agrees...
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.con.doc/q017780_.htm |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Sep 16, 2018 4:29 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Hi Ashish,
MQ does not guarantee message order (except in very specific circumstances), so MQ messaging designs should NEVER make any assumptions about the order that a consumer application gets them.
I have seen apps brought to their knees because they went ahead with a design based on this flawed assumption. The architect was very red faced and there was major effort and cost to implement a work-around.
If your messages have affinity (aka ordering or any other independence) the consumer app needs to be able to handle MQ messages that are out of order (eg. they were delivered via diffierent MQ paths or delayed due to MQ or network outage). This is usually done by staging the messages to a DB and initiate processing when sequences are complete. _________________ Glenn |
|
Back to top |
|
 |
ashish_MQ |
Posted: Mon Sep 17, 2018 1:41 am Post subject: |
|
|
Newbie
Joined: 13 Sep 2018 Posts: 3
|
@Glenn
Thanks for your response.
As per suggestion on this portal I need to rethink about my design,I guess have to use weblogic jms queue as It provide unit of order which make sure of order of processing for the messages posted on jms queue.
Thanks again |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 17, 2018 5:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ashish_MQ wrote: |
As per suggestion on this portal I need to rethink about my design,I guess have to use weblogic jms queue as It provide unit of order which make sure of order of processing for the messages posted on jms queue. |
Even if you have a technology that provides this, your design needs to cater for failure situations where (for example) a message cannot be processed for some reason (perhaps invalid business data in the payload). Given that you can't process the next message until this one has been resolved (or the order of receipt wouldn't matter) you need to figure out what your remediation will be. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Sep 17, 2018 3:41 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
ashish_MQ wrote: |
@Glenn
Thanks for your response.
As per suggestion on this portal I need to rethink about my design,I guess have to use weblogic jms queue as It provide unit of order which make sure of order of processing for the messages posted on jms queue.
Thanks again |
https://docs.oracle.com/cd/E13222_01/wls/docs100/jms/uoo.html is interesting reading. Basically WebLogic Server implements a feature on top of the JMS transport layer. There are a lot of caveats and considerations! Good luck.  _________________ Glenn |
|
Back to top |
|
 |
|