|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Message Order in WMQ |
« View previous topic :: View next topic » |
Author |
Message
|
sumeet |
Posted: Mon Jul 05, 2004 8:45 pm Post subject: Message Order in WMQ |
|
|
Novice
Joined: 16 Mar 2004 Posts: 16
|
Hello all,
We are developing an application using messaging, in which we need to maintain sequence of messages.
We have only one application sending the messages out and one MDB listening for the messages on the destination queue.
From what I understand, if a bunch of messages (put on a queue over a period of time) are persistent and have the same priority, then they will follow the FIFO rule.
As per intercommunication guide, sequencing is guaranteed if certain conditions are met. One of the conditions is that, "all put requests were either from the same unit of work, or all the put requests were made outside of a unit of work."
In our case, we are putting messages one by one and each put is within its own transaction, involving writing to a database also.
In this case also, will WMQ guarantee the ordering of messages or not?
Cheers,
Sumeet |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 06, 2004 2:57 am Post subject: Re: Message Order in WMQ |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
sumeet wrote: |
We are developing an application using messaging, in which we need to maintain sequence of messages. |
Why? That is, you should think twice about this design.
sumeet wrote: |
In our case, we are putting messages one by one and each put is within its own transaction, involving writing to a database also.
In this case also, will WMQ guarantee the ordering of messages or not? |
It depends. The rest of the conditions apply as well. If you have a single application putting messages to a queue, the unit of work condition is LESS likely to matter - for this reason. Messages appear on the queue in the order of commit - but in your case that will be the same as the order of put, if you are not using threading or whatever for your transactions (one transaction *must* complete before the next starts). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
leongor |
Posted: Tue Jul 06, 2004 4:12 am Post subject: |
|
|
 Master
Joined: 13 May 2002 Posts: 264 Location: Israel
|
yes. _________________ Regards.
Leonid.
IBM Certified MQSeries Specialist. |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Jul 06, 2004 5:43 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Jeff is right about your needing to rethink this. If everything goes without a problem, you'll be ok. However, what are you going to do if a single message ends up on the dead letter queue? Are you prepared to handle this? If you can avoid the dependency on message order, you'll be better off in the long run. |
|
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
|
|
|
|