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 » MQInput node and grouped messages

Post new topic  Reply to topic Goto page 1, 2  Next
 MQInput node and grouped messages « View previous topic :: View next topic » 
Author Message
4integration
PostPosted: Tue Jul 01, 2008 9:56 pm    Post subject: MQInput node and grouped messages Reply with quote

Disciple

Joined: 04 Sep 2006
Posts: 197
Location: Gothenburg, Sweden

Hello,

I have a scenario with 6 messages on WMQ which are grouped. I need to have the flow in WMB (MQInputNode) to get all 6 messages as one message.
Therefore I have configured the MQInputNode with (Advanced tab):

Quote:
Transaction Mode: Automatic
Order Mode: By Queue Order
Logical Order: <checked>
All messages available: <checked>
Commit by message group: <checked>


But I get the messages as individual messages. Is it possible to get one concatenated message from MqInput?
_________________
Best regards
4 Integration
Back to top
View user's profile Send private message
AkankshA
PostPosted: Tue Jul 01, 2008 10:57 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

from infocenter :

Quote:
If you include messages in a group, and it is important that all of the messages within the group are read from the queue and processed in the order in which they are defined in the group, you must complete all of the following actions:

Select Commit by message group.
Select Logical order.
Set Order mode to By Queue Order or set the message flow property Additional instances to 0.

If you choose either, or both, of these options, the message flow processes the messages on a single thread of execution, and a message is processed to completion before the next message is retrieved from the queue. In all other cases, it is possible that multiple threads within a single message flow are processing multiple messages, and the final message in a group, which prompts the commit or roll back action, is not guaranteed to be processed to completion after all other messages in the group.

You must also ensure that you do not have another message flow that is retrieving messages from the same input queue. If you do, the order in which the messages within a group are processed is not guaranteed.


I feel its working as designed.... as they dint mention that u ll be receiving all messages together... its all a game of transactionality...
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
4integration
PostPosted: Wed Jul 02, 2008 4:00 am    Post subject: Reply with quote

Disciple

Joined: 04 Sep 2006
Posts: 197
Location: Gothenburg, Sweden

Some more info on the problem.

The sending application are splitting the logical message in multiple messages, based on size or "records" (row-based) and are grouped together with GroupId. This means that the single message is (most likely) not a logical message and can not be processed until the complete logical message is available.

What I need is to have a concatenated logical message before the processing begins in the flow.

Do you any any nice ideas how to solve this? (not consuming too much memory etc)
_________________
Best regards
4 Integration
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed Jul 02, 2008 4:19 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

Using MQGet node can be a solution for this...
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
tanishka
PostPosted: Fri Sep 03, 2010 5:17 am    Post subject: Receiving Messages in GROUP using MQGET node Reply with quote

Centurion

Joined: 24 Nov 2008
Posts: 144

Hi,

I have similar problem.

My flow design like below.

MQ input node -- > Computenode --> Mq output node --> MQ GET node --> Compute node --> MQ Output node.

In first compute node i am sending messages in MQ group. In Second Compute node I need to get messages in group and store them in environment varible. Give me idea how i implement code and MQGET node properties?

My input message like this


<PO>
<Msgtype></Msgtype>
<Msgsource></MsgSource>
<Msgtype></Msgtype>
<detail>
<item>1</item> (can be Unbounded)
</detail>
<detail>
<item>2</item>
</detail>
<detail>
<item>3</item>
</detail>
<detail>
<item>4</item>
</detail>
</PO>

I am sending one message per one item in MQ group to MQ output node like below

<ITEM>
<No>1</No>
</ITEM>

I receive response to these messages like below

<ITEM>
<ItemNo>1</ItemNo>
<ItemWidth>12</ItemWidth>
<ItemHeight>13</ItemHeight>
<ItemLength>13</ItemLength>
</Item>

<ITEM>
<ItemNo>2</ItemNo>
<ItemWidth>22</ItemWidth>
<ItemHeight>33</ItemHeight>
<ItemLength>33</ItemLength>
</Item>

--

Finally i need to map these values to Output message.


<ORDER>
<Msgtype></Msgtype>
<Msgsource></MsgSource>
<Msgtype></Msgtype>
<ITEM>
<ItemNo>1</ItemNo>
<ItemWidth>12</ItemWidth>
<ItemHeight>13</ItemHeight>
<ItemLength>13</ItemLength>
</Item>
<ITEM>
<ItemNo>2</ItemNo>
<ItemWidth>22</ItemWidth>
<ItemHeight>33</ItemHeight>
<ItemLength>33</ItemLength>
</Item>
</ORDER>


Last edited by tanishka on Fri Sep 03, 2010 5:28 am; edited 2 times in total
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Sep 03, 2010 5:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Use collector node.
Back to top
View user's profile Send private message
tanishka
PostPosted: Fri Sep 03, 2010 7:34 pm    Post subject: Reply with quote

Centurion

Joined: 24 Nov 2008
Posts: 144

Collector erasing environment tree. Is that correct? I cannot use input body.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Sep 03, 2010 9:48 pm    Post subject: Reply with quote

Jedi Council

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

If you think of a collector node flow as being essentially TWO separate flows.

The first part with an MQInput Node and a Compute node.
THe Compute node propagates the messages to the right terminal on the collector node.

The collector node holds everything back until the collection is complete.

Once a single message (With all the parts of the collection assembled together)
is released by the compute node, real processing can begin.

In my limited experience with the Collector node, you really don't want to even try to keep information from either side of the collector node unless it is in the collection data itself.
_________________
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
mqjeff
PostPosted: Sat Sep 04, 2010 6:29 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Strictly speaking, though, since this is a request/reply pattern, which I didn't notice when I said "use collector", you should use the Aggregate nodes instead.

If you just have a group of separate input messages to process as a unit, use Collector node.

If you have a group of response messages from requests build from a single input message, use Aggregate nodes.
Back to top
View user's profile Send private message
tanishka
PostPosted: Sat Sep 04, 2010 7:08 am    Post subject: Reply with quote

Centurion

Joined: 24 Nov 2008
Posts: 144

My design is

MQ input node -- > Computenode --> Mq output node --> MQ GET node --> Collector Node --> Compute node2 --> MQ Output node.

I am receiving one input message from that message i have to send multiple message requests to the queue and geeting multiple messages responses.
and send one output message.

If I used Collector node its sounds ok me. only my problem is environment tree got erased by collector node.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sat Sep 04, 2010 8:41 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.

If you are going to use the collector node AND for some strange reason have to preserve the LocalEnvironment onto the far side of the collector node (I can't think of a good reason for this if you regard the flow as essentially two separate ones) then you can copy the localEnvironment into the OutputRoot and propagate it to an input terminal of the collector node. With the right xpath definition it will be added to the collection.

Then when the collection is complete, the save local environment will be propagated out of the collector node as part of the Collection Tree. You can easily extract it and put it back into the LocalEnvironment once more.
_________________
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
tanishka
PostPosted: Sat Sep 04, 2010 8:44 am    Post subject: Reply with quote

Centurion

Joined: 24 Nov 2008
Posts: 144

MQJeff,

In my case the request message is going same output queue and the number of requests going to backend application is dynamic(depends on the number of Item Messaages in the Input Request). In this case I cannot use AggregateRequest node with unique folder name.

One thing I am not sure is whether MQGET node can get all the messages in Group.
Please let me know.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sat Sep 04, 2010 9:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Are you sending one message to MQOutput or more than one message?

If it's one message to MQOutput, that then generates N response messages, then you have to use Collector.

If it's N messages going to MQOutput, than then generate N responses, then you should use Aggregation. And Aggregation should be fine for a dynamic number of Responses, as long as there is one Request for EACH Response.

MQInput->Compute->MQOutput->AggregateRequest
MQGet->AggregateResponse->...

If you are using Collector, you will need to run a loop over MQGet to get each message in the group, and use the Last Message In Group to signal that the collection is finished and should be propagated out.

In either case, this is not quite Broker 101. It's more like Broker 201, so you should prepare some sample cases and build some test flows to make sure you understand the concepts.
Back to top
View user's profile Send private message
tanishka
PostPosted: Sat Sep 04, 2010 12:54 pm    Post subject: Reply with quote

Centurion

Joined: 24 Nov 2008
Posts: 144

I am sending n number of messages to MQ output , Application generates n number of responses.

I used collector node like below.

MQ input node -- > Computenode --> Mq output node --> MQ GET node --> Collector Node --> Compute node2 --> MQ Output node.

Problem is environment varibles not carry through the collector node.

I will try Aggregation nodes and MQGET in the loop and let u know the result. Thanks so much.
Back to top
View user's profile Send private message
tanishka
PostPosted: Tue Sep 07, 2010 7:03 pm    Post subject: Reply with quote

Centurion

Joined: 24 Nov 2008
Posts: 144

I created sample flow with MQGET node in the loop working fine for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQInput node and 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.