ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Grouping and Logical Order question

Post new topic  Reply to topic
 Grouping and Logical Order question « View previous topic :: View next topic » 
Author Message
liviur
PostPosted: Mon May 22, 2006 5:26 am    Post subject: Grouping and Logical Order question Reply with quote

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
View user's profile Send private message
sirsi
PostPosted: Fri May 26, 2006 12:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
liviur
PostPosted: Fri May 26, 2006 12:49 pm    Post subject: re: from the documentation Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Fri May 26, 2006 4:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
liviur
PostPosted: Sat May 27, 2006 7:17 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Sat May 27, 2006 11:43 am    Post subject: Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Sun May 28, 2006 1:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Grouping and Logical Order question
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.