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 » Message re-grouping in broker

Post new topic  Reply to topic
 Message re-grouping in broker « View previous topic :: View next topic » 
Author Message
MQEnthu
PostPosted: Wed Apr 22, 2015 4:52 am    Post subject: Message re-grouping in broker Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

Hi,

I am receiving a segmented messages from application on to my input queue of a flow. It is XML message and split message do not form a valid xml. I would want to have them grouped and form a single message and then process it in flow.
I have set the Group related properties (Logical Order, All messages available and Commit by message group). But no luck.

Wanted to know if we can achieve this in broker flow? Please suggest.

Thank you
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 22, 2015 5:01 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Depending on how big the actual XML is, have you thought about using a collection node? This way you could assemble the full XML before processing it...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Apr 22, 2015 5:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Broker only supports Grouped messages, not Segmented messages.

You can investigate the options to automatically assemble segmented messages by the queue manager.

Or you can use some method of collecting the individual segments and assembling the contents into a single bitstream and then parsing that.
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Wed Apr 22, 2015 5:13 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

Quote:
Broker only supports Grouped messages, not Segmented messages.


Sorry!! It is grouped messages only. Still not working . I want to consume it as whole one message in broker flow
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Apr 22, 2015 5:15 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Ok, so it is not working.

What is not working? Please explain otherise we can't even begin to help
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Apr 22, 2015 5:31 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Possibly you don't understand how grouped messages work.

When generated the "message in group" flag is set on each one (and the same groupid value). On the final one the "last in group" is flag set.

On WMB MQ input node the "all messages available" check box needs to be ticked. This instructs MQ to only supply the first message in the group when the entire group is on the queue.

The message flow will be presented with the first message in group, and the flow will run to completion. It will then be presented with the next in group and so on.

If the message flow needs to take some action such as to accumulate the messages together - that has to be done in the flow - for example you might pass each message to a file output node.

The flow can detect the last message in group by examining the MQMD message flags and then can optionally choose to perform any final actions (such as finalising the file).

So you can do whatever you want - but this is not some magical group assembly of message data into one huge message. It is passing your flow each message in the group, one at a time.

Your flow logic has to do any assembly required (watch out for memory use).
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Wed Apr 22, 2015 5:48 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

zpat wrote:
Your flow logic has to do any assembly required (watch out for memory use).


Thanks for clarification. I was thinking the assembling/merging would happens by itself with some settings. By enabling some MQGMO options
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Apr 22, 2015 7:43 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

To detect the last message

Code:
IF (InputRoot.MQMD.MsgFlags = MQMF_LAST_MSG_IN_GROUP + MQMF_MSG_IN_GROUP) OR
         (InputRoot.MQMD.MsgFlags = MQMF_LAST_MSG_IN_GROUP) THEN
         PROPAGATE TO TERMINAL 'out' FINALIZE NONE DELETE NONE;   /* SEND LAST MESSAGE TO DOWNSTREAM NODES */
         PROPAGATE TO TERMINAL 'out1';                            /* PERFORM FINAL ACTIONS IF ANY */
         RETURN FALSE;
      END IF;

_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Wed Apr 22, 2015 8:14 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

Thanks..

As first approach, I will try to ask sending application not to split messages and try to have less number of records in each message to reduce the message size.
If that is not possible I will try to handle it in broker
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
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 » Message re-grouping in broker
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.