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 » WebSphere Message Broker (ACE) Support » Another message grouping question...

Post new topic  Reply to topic
 Another message grouping question... « View previous topic :: View next topic » 
Author Message
Empeterson
PostPosted: Fri May 16, 2003 12:10 pm    Post subject: Another message grouping question... Reply with quote

Centurion

Joined: 14 Apr 2003
Posts: 125
Location: Foxboro, MA

Hello,
I have the follwing scenario:

I am taking in a group of messages as a group. I may have 1 or more messages coming in the group. I also may have 1 more message going out in the group than I had coming in. Do I have to explicitly change the sequence number or does wmqi/mq handle that on its own?

For instance:
A group of messages hits the queue and there are 2 messages in the group. WMQI picks up the first message, does some processing and needs to output 2 messages to the queue. I have noticed that both the messages are output to the queue with sequence number 1. The second message then gets processed, output to the queue and put to the queue with sequence number = 2. So now I have 2 messages on the queue with the same group id and sequence number. I assume that is not a good thing, and in fact am a little surprised that MQ would even allow me to do that. Is there a way to get WMQI or MQ to handle the sequence numbering or do I have to change the MQMD myself? I would like to not have to manipulate the MQMD myself. Any following messages in the group have no idea if the previous message in the group output 2 messages or not unless I store some flag in a database or queue somewhere to retrieve and I want to avoid doing that. I also dont want to arbitrarily increment the sequence by 1 because I may wind up with a scenario of having 2 messages in the group, one with a sequence number of 1 and one with a sequence number of 3. I assume that is just as bad as having 2 messages in the same group with the same sequence number.
Back to top
View user's profile Send private message Send e-mail AIM Address
Empeterson
PostPosted: Mon May 19, 2003 7:10 am    Post subject: Reply with quote

Centurion

Joined: 14 Apr 2003
Posts: 125
Location: Foxboro, MA

The application that is putting the initial input message to the queue has tried to manipulate the msgseqnumber directly, but MQ always resets it to be what it should be, ie first message gets seqnum of 1, second gets 2 etc. Why isnt WMQI doing the same thing? Why do I even need to worry about the sequence number? The MQ Application Programming Guide and Reference manuals both tell me that as long as you are putting the message as a logical group, then MQ will handle the sequence numbering but this does not seem to be the case in WMQI. Am I missing a setting somewhere?
Back to top
View user's profile Send private message Send e-mail AIM Address
Craig B
PostPosted: Wed Jun 18, 2003 10:28 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

As far as I understand it then the Websphere MQ queue manager is responsible for controlling the values of a message group when one is initiated by the user. However, this should only be the case when the MQPUT is being performed using the option MQPMO_LOGICAL_ORDER. If this is not set then it is up to the user to ensure that the first message in the group is put with a GroupId = MQGI_NONE to request a new unique group identifier and then store this away after the MQPUT to re-use for the rest of the messages in the group. It would seem that if MQPMO_LOGICAL_ORDER is not used then the queue manager leaves it to the application to set such things as GroupId and MsgSequenceNumber. I do not believe there is any option on the MQOutput node to get the MQPUT to be performed with MQPMO_LOGICAL_ORDER. In the MQMD the user can set the MsgFlags field to specifiy MQMF_MSG_IN_GROUP and MQMD_LAST_MSG_IN_GROUP and the GroupId can also be set, but there seems to be no way to set MQPMO_LOGICAL_ORDER anywhere.

If this is the case then it is up to the application to control the message group which could then lead to storing information such as the GroupId between each message, so the next message processed by the flow can access it.

The architecture of a WMQI message flows does not really work with message grouping in that multiple input messages cannot be retrieved in one go and processed together at the same time. Well that is the case for the IBM primitives, obviously the user can write an input plugin node to retrieve multiple messages in the same group if they require that type of functionality.

The MQInput node offers a Commit by Message Group option which changes the time of commit for a unit of work started by a message flow. By default a commit is issued after each message, and this can be changed by altering the Commit Count when assigning to an execution group. If the Commit by Message Group is used then this means the commit is issued when the MQMF_LAST_MSG_IN_GROUP message is encountered. This does not give the same sense of message grouping since each message was dealt with separately and if a rollback of the transaction is required then the atomicity is lost.

By the results you observed it would seem that MQPMO_LOGICAL_ORDER is not used since it would appear your values were taken from your input message. So when you copied your MQMD folder through the flow then the old input groupId and sequenceNumbers were set and this is why you ended up with two with the sequenceNumber of 1.
_________________
Regards
Craig
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 » WebSphere Message Broker (ACE) Support » Another message grouping 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.