|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Grouping and Logical Order question |
« View previous topic :: View next topic » |
Author |
Message
|
liviur |
Posted: Mon May 22, 2006 5:26 am Post subject: Grouping and Logical Order question |
|
|
Novice
Joined: 15 Nov 2005 Posts: 15
|
Hello,
I'd like to validate an assumption I've made, for which the documentation is a bit unclear (at least from my perspective):
If I don't use MQPMO_LOGICAL_ORDER but rather manually (at the application level) set the GroupID and keep on incrementing the MessageSequenceNumber (starting with 1) for each subsequent message, am I guaranteed that the Queue Manager will deliver these messages in order? That is, does it produce the same results as if I had used MQPMO_LOGICAL_ORDER?
Thank you,
Liviu. |
|
Back to top |
|
 |
sirsi |
Posted: Fri May 26, 2006 12:11 pm Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
from the documentation:-
Quote: |
For applications that put messages and segments in logical order, specify MQPMO_LOGICAL_ORDER, as this is the simplest option to use. This option relieves the application of the need to manage the group and segment information, because the queue manager manages that information. However, specialized applications might need more control than that provided by the MQPMO_LOGICAL_ORDER option, and this can be achieved by not specifying that option. If this is done, the application must ensure that the GroupId, MsgSeqNumber, Offset, and MsgFlags fields in MQMD are set correctly, before each MQPUT or MQPUT1 call. |
|
|
Back to top |
|
 |
liviur |
Posted: Fri May 26, 2006 12:49 pm Post subject: re: from the documentation |
|
|
Novice
Joined: 15 Nov 2005 Posts: 15
|
sirsi,
That's what I figured also. However, there's no mention if the Queue Manager will insure sequential delivery of said messages, once the application does set the required fields. One can only hope that it does.
Thank you so much for your reply. |
|
Back to top |
|
 |
EddieA |
Posted: Fri May 26, 2006 4:37 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
One can only hope that it does |
if certain conditions are met, then, yes MQ will maintain the order of the messages. But this should never be relied on.
But IBM thought of this. That's why they provide a MQGMO_LOGICAL_ORDER option.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
liviur |
Posted: Sat May 27, 2006 7:17 am Post subject: |
|
|
Novice
Joined: 15 Nov 2005 Posts: 15
|
Hello EddieA,
The main reason we're not able to use MQPMO_LOGICAL_ORDER is because we're transmitting a large message in several chunks and implemented checkpoiting. MQ requires that you keep the connection open to the queue (and implicitly to the queue manager) even if you commit messages in batches. This doesn't work well for our model, where an application stop (crash or scheduled shutdown) will disconnect. MQ errors out with MQRC_INCOMPLETE_GROUP if you commit explicitly (or implicitly by closing the queue and /or queue manager) before puting the last message with the LAST_MESSAGE_IN_GROUP flag set.
Anyway, we're using MQGMO_LOGICAL_ORDER upon retrieval of the messages, the only question was if MQ will send messages in the "Sequence Number" order if the sending application doesn't use MQPMO_LOGICAL_ORDER but rather chooses to set the group id, message sequence number, etc.
Thank you for your reply,
Liviu. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat May 27, 2006 11:43 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If MQGMO_LOGICAL_ORDER guarantees that you will receive the messages in logical order, then why do you care what order MQ transmits them in? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EddieA |
Posted: Sun May 28, 2006 1:49 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Anyway, we're using MQGMO_LOGICAL_ORDER upon retrieval of the messages, the only question was if MQ will send messages in the "Sequence Number" order if the sending application doesn't use MQPMO_LOGICAL_ORDER but rather chooses to set the group id, message sequence number, etc. |
The receiving application has no way of knowing how the fileds were set, either by MQ, or by an application. As long as they are correct, then MQGMO_LOGICAL_ORDER will present them correctly.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
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
|
|
|
|