Author |
Message
|
mqxplorer |
Posted: Mon Feb 03, 2014 9:55 am Post subject: Overriding the Quantity property in Collector node dynamical |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Hi,
I guess, this might make some of you feel like.. why don't you first search the forum first and ask the question..
I have searched the forum but could not really find the answer for my question. I want to override the value set to Quantity of collector node dynamically. This would solve my problem of collecting the replies (N) from the back end application for the requests (N) sent and sending as one reply to the client from where WMB flow got.
Thanks in advance for the help.
Thanks
Thirupathi |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 03, 2014 10:04 am Post subject: Re: Overriding the Quantity property in Collector node dynam |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqxplorer wrote: |
This would solve my problem of collecting the replies (N) from the back end application for the requests (N) sent and sending as one reply to the client from where WMB flow got. |
This sounds a lot more like an aggregation fan out -> fan in than it sounds like a collection. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Feb 03, 2014 10:30 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You don't need to override it dynamically.
You just need to understand how collector works. You define a set of terminals to receive input messages. The collection is complete when all terminals have received enough input to match their conditions.
So if you have
Terminal 1: unlimited
Terminal 2: 1
Then the collection will complete every time a message comes to terminal 2, and include how ever many messages were sent to terminal 1 since the last time terminal 2 was fired.
Fitting this to your particular scenario is accomplished by the process of software design.
As my esteemed colleague says, however, this sounds a lot more like an Aggregation pattern than a Collection pattern. The big difference between the two is whether or not there is a single input that starts the pattern - i.e. are you taking a single message and turning it into N requests and then assembling n replies? Or are you taking N requests and assembling N replies?
If it's one message, that's Aggregation. If it's N messages, then that's Collection. |
|
Back to top |
|
 |
mqxplorer |
Posted: Tue Feb 04, 2014 6:34 am Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Hi Vitor and mqjeff,
Thanks a lot for your quick response and I now understood that my scenario is an Aggregation pattern not a collector pattern. I implented my solution using aggregation nodes and it works.
I have my fan-out flow like this : MQInput --> AggergateControl --> Compute --> MQOutput -- AggregateRequest.
I receive a single file with several CSV records in it and I am splitting them in Compute node and propagating to the queue configured on the MQOutput node from where the backend application pickup the messages and sends the responses back.
I understand that the folder name on the AggregateRequest node need not be unique, however, is there any way we can override the value so that name will be unique for each request sent out?
Thanks again for your quick help and clarification.
Thanks
mqxplorer |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 04, 2014 6:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqxplorer wrote: |
I understand that the folder name on the AggregateRequest node need not be unique, however, is there any way we can override the value so that name will be unique for each request sent out? |
No. Why would you want or need to? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqxplorer |
Posted: Tue Feb 04, 2014 10:39 am Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
|
Back to top |
|
 |
mqxplorer |
Posted: Thu Feb 13, 2014 11:54 am Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
I have achieved my splitting and aggregation functionality using the aggregation nodes. I was doing some experiments by sending messages to MessageFlowA which acts as an application and responds back to the fain-in flow. I had a logic in my MessageFlowA which filters out a specific message out of 3 messages it received and sends it another flow called MessageFlowB (which is stopped). MessageFlowA responds to the Fan-in flow with two responses as one of the messages were filltered out and sent to MessageFlowB. My Fan-in flow picks up the two responses and waits for the thrid response. After a minute or so, I will start my MessageFlowB which sends the filtered out resp message to my Fan-in flow. The Fan-in flow aggregates the three responses, however, the order of the responses is not same as the order of the requests sent out. I guess, as the appliaction did not respond to the requests in sequence it received, aggregate reply node could not collect them in order. For our requirement, we need the responses in order when we send back the aggregated message to the client. What should I do to achieve this? Can I achieve this by sequence nodes or message grouping concept in MQ?
Thanks
mqexplorer |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 13, 2014 12:02 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqxplorer wrote: |
For our requirement, we need the responses in order when we send back the aggregated message to the client. What should I do to achieve this? |
Fix the requirement, or write a few lines of ESQL _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 13, 2014 12:04 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
If you're looking in the WMBv6.1 InfoCenter because you're still using WMBv6.1, consider upgrading. If you're just looking in the wrong InfoCenter, you're looking in the wrong InfoCenter.
There's a difference between multiple deployed copies of a flow, and additional instances of a single deployed flow. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
tony_f |
Posted: Wed Feb 19, 2014 8:47 am Post subject: Triggering completion of a collector node collection |
|
|
Novice
Joined: 30 Sep 2011 Posts: 19
|
In a reply to another post on this forum, the following was posted
mqjeff wrote: |
You don't need to override it dynamically.
You just need to understand how collector works. You define a set of terminals to receive input messages. The collection is complete when all terminals have received enough input to match their conditions.
So if you have
Terminal 1: unlimited
Terminal 2: 1
Then the collection will complete every time a message comes to terminal 2, and include how ever many messages were sent to terminal 1 since the last time terminal 2 was fired.
Fitting this to your particular scenario is accomplished by the process of software design.
. |
This would be an ideal solution to what I need to do but I don't quite understand how you could define terminal 1 to receive unlimited messages. I thought that the terminal would have to have either the message count or a timeout set to indicate the completion from that terminal?
Tony |
|
Back to top |
|
 |
akidase |
Posted: Thu Apr 06, 2017 2:40 am Post subject: |
|
|
Centurion
Joined: 10 Jan 2011 Posts: 124
|
Quote: |
This would be an ideal solution to what I need to do but I don't quite understand how you could define terminal 1 to receive unlimited messages. I thought that the terminal would have to have either the message count or a timeout set to indicate the completion from that terminal?
Tony |
Placing the Quantity as 0 - If you select 0 (zero) or do not specify a value, there is no limit to the number of messages accepted.
That said,
I am trying to do the same but couldn't accomplish. Getting the error message as..
The collector node event handler was passed an empty message |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 06, 2017 8:30 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you need the responses to come in a specific order, see if you can dynamically set the folder name on the aggregation request node.
The responses will then be sent to the corresponding aggregation folder.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
adubya |
Posted: Thu Apr 06, 2017 11:20 pm Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
I hate these thread resurrection posts !  _________________ Independent Middleware Consultant
andy@knownentity.com |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Apr 07, 2017 6:35 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
adubya wrote: |
I hate these thread resurrection posts !  |
We need a zombie emoji. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Apr 07, 2017 8:21 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
mqjeff wrote: |
adubya wrote: |
I hate these thread resurrection posts !  |
We need a zombie emoji. |
Vitor after one too many [insert tipple of choice] perhaps? _________________ 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 |
|
 |
|