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 » WMB 6.1 Message Flow not always reading Grouped messages

Post new topic  Reply to topic
 WMB 6.1 Message Flow not always reading Grouped messages « View previous topic :: View next topic » 
Author Message
StephenDub
PostPosted: Wed Apr 11, 2012 8:45 pm    Post subject: WMB 6.1 Message Flow not always reading Grouped messages Reply with quote

Newbie

Joined: 11 Apr 2012
Posts: 3
Location: Wellington, New Zealand

I have a WMB 6.1 message flow which reads "grouped" messages from a queue and processes them as a group. However, sometimes all the messages for a group sit on the queue without getting processed. New messages which form part of other groups are processed ok, but for some reason the original group stays on the queue. All messages have the same GroupId, have Sequences starting at 1 and incrementing as they go, and have a "Last Message In Group" flag on the last message in the group.

MQInput properties are : TransactionMode=Auto, OrderMode=Default, LogicalOrder=yes, AllMessagesAvailable=no, CommitByMessageGroup=no

Could someone please point out any glaring errors in the setup, or suggest new courses of action that I could take?
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Apr 11, 2012 11:14 pm    Post subject: Re: WMB 6.1 Message Flow not always reading Grouped messages Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

StephenDub wrote:
All messages have the same GroupId, have Sequences starting at 1 and incrementing as they go, and have a "Last Message In Group" flag on the last message in the group.


Am I reading you correctly, do you really mean that all your groups have the same GroupId?

StephenDub wrote:
I have a WMB 6.1 message flow which reads "grouped" messages from a queue and processes them as a group.
...
MQInput properties are : TransactionMode=Auto, OrderMode=Default, LogicalOrder=yes, AllMessagesAvailable=no, CommitByMessageGroup=no


Your MQInput properties do not seem correct for processing messages as a group. So i assume the flow gets the first message of the group and then uses MQGet to fetch the rest of the group?

Have you checked the backout count of the first message of the group that is stuck in the queue? What kind of exception handling do you have?
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Apr 11, 2012 11:38 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

All Messages Available needs to be set to Yes, so that you won't start processing any group until it is complete on the queue.

At least that is the usual way to use group processing. Otherwise the flow would get suspended part way through one incomplete group even when there are other complete groups ready on the queue.

You don't need to use MQGET node - the flow will be driven for each message in the group and you can detect the last one in the group (if you want to) by looking at the MQMD flags.

Always worth reading the WMQ Application Programming Guide/Ref (or the WMQ infocenter) because WMB is just encapulsating the MQI calls.
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Apr 11, 2012 11:54 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

zpat wrote:
All Messages Available needs to be set to Yes, so that you won't start processing any group until it is complete on the queue.


Exactly. I suspect that the flow has additional instances and the MQGet loop is written in such a way that it ends up in an endless loop if one of the messages is missing...

@StephenDub: does the problematic group get processed if you kill the execution group?


zpat wrote:
You don't need to use MQGET node - the flow will be driven for each message in the group and you can detect the last one in the group (if you want to) by looking at the MQMD flags.


Unless the OP is transforming a group of messages into one. His mention of 'reading "grouped" messages' makes me think he is using message grouping for segmentation. Instead of sending segmented messages and letting MQInput assemble them automatically
Back to top
View user's profile Send private message
StephenDub
PostPosted: Sun Apr 15, 2012 12:24 pm    Post subject: Reply with quote

Newbie

Joined: 11 Apr 2012
Posts: 3
Location: Wellington, New Zealand

Thanks for the assistance and speculation. The flow is meant to "merge" messages comign from z/OS, as z/OS doesn't allow normal segmentation, so it's doing 1 MQInput and a "loop" of MQGets. I'll change the settings initially, and experiment with creating a new flow which doesn't have the MQGet loop.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Apr 15, 2012 2:58 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

StephenDub wrote:
so it's doing 1 MQInput and a "loop" of MQGets.


There are a number of posts on the dangers of looping MQGet.

StephenDub wrote:
experiment with creating a new flow which doesn't have the MQGet loop.


Start with a Collector node & experiment from there.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Esa
PostPosted: Sun Apr 15, 2012 11:10 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Vitor wrote:

There are a number of posts on the dangers of looping MQGet.

There is also a correct way to loop with MQGet. It is essential to write the loop in ESQL (or java) and propagate to MQGet from within the loop. You can make the loop perform very well, if you understand how the propagation model of Message Broker works.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Apr 16, 2012 4:39 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Esa wrote:
You can make the loop perform very well, if you understand how the propagation model of Message Broker works.


And you can bring down the execution group if you don't understand how the model works.

Hence my use of the word "danger". You can easily repalce the worn brake components of your car if you understand how the mechanism works. If you don't understand the mechanism, or worse still think you do when in fact you don't, there is some danger.

So I pointed the OP at the previous threads outlining these dangers so they may be avoided.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
StephenDub
PostPosted: Mon Apr 16, 2012 3:28 pm    Post subject: Reply with quote

Newbie

Joined: 11 Apr 2012
Posts: 3
Location: Wellington, New Zealand

I thought my days of being impressed by WMB 6.1 were long gone, but I was wrong.

The flow has been re-designed to use a Collector node, and to use the "OutputRoot.BLOB.BLOB[1]" method of concatenating the messages. And it's working like a dream.

Thanks to all who helped.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Apr 17, 2012 12:51 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So...the Collector node can be a good alternative to using an MQGet-in-a-loop?
I think that is worth highlighting, for the benefit of future readers of this thread. I've seen several users with hard-to-solve stack or heap exhaustion problems when they use MQGet in a loop. Even when they followed the good advice give by Esa.
Back to top
View user's profile Send private message
Esa
PostPosted: Tue Apr 17, 2012 1:46 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Interesting. This is something I haven't thought about in this context before.
Even if you loop within a compute or java compute node and only propagate to the MQGet to fetch the next message, you will eventually get exhausted if you process thousands of messages. Not because of the call stack, but because of orphaned parsers!

So you will actually have to propagate to a passtrough node with DELETE DEFAULT after each message from MQGet.

I guess that will work even if the message from MQGet is in LocalEnvironment, won't it, Kimbert?
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 » WMB 6.1 Message Flow not always reading Grouped messages
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.