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 » General IBM MQ Support » How to preserve message order with multiple consumers

Post new topic  Reply to topic
 How to preserve message order with multiple consumers « View previous topic :: View next topic » 
Author Message
hbq
PostPosted: Thu Jan 23, 2014 6:24 am    Post subject: How to preserve message order with multiple consumers Reply with quote

Newbie

Joined: 23 Jan 2014
Posts: 1

I have an application server cluster which consumes messages from a single queue in Websphere MQ. I need to preserve message ordering within a message group, even when multiple consumers (all cluster nodes) consume from the same queue.

I use the Websphere MQ Message Groups feature to ensure message ordering within a group. However I am not sure if MQ guarantees correct message ordering when there are multiple consumers. Basically I want MQ to ensure that one consumer always gets all messages within a message group. Message groups should be load balanced across all consumers, but messages within a message group should not.

ActiveMQ ensures this behaviour, as documented here: (Sorry I cannot post proper links yet) activemq <dot> apache <dot> org <slash> how-do-i-preserve-order-of-messages <dot> html

However I cannot find such guarantees in the Websphere MQ documentation.

I use the flag MQGMO_LOGICAL_ORDER when putting messages in the queue. To specify the message sequence within a message group, I use the options MQMF_MSG_IN_GROUP and MQMF_LAST_MSG_IN_GROUP. Consumers use the options MQC.MQGMO_LOGICAL_ORDER | MQC.MQGMO_ALL_MSGS_AVAILABLE when receiving from the queue.

Thanks for any pointers or help,
Henning
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Jan 23, 2014 6:50 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

From the Info Centre (V7.5):

"...
The getting application specifies the MQGMO_ALL_MSGS_AVAILABLE option for the first message in the group. This ensures that processing does not start until all the messages within the group have arrived. The MQGMO_ALL_MSGS_AVAILABLE option is ignored for subsequent messages within the group. When the first logical message of the group is retrieved, you can use MQGMO_LOGICAL_ORDER to ensure that the remaining logical messages of the group are retrieved in order..."

It's not logical that WMQ would allow more than one consumer to pull messages from within a message group, otherwise it wouldn't be a group but a free-for-all.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
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 » General IBM MQ Support » How to preserve message order with multiple consumers
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.