Author |
Message
|
GeneRK4 |
Posted: Tue Mar 11, 2014 2:25 am Post subject: Collector node contraint in Grouping messages |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
Hi,
While using Collector node to group the messages,I found some contraints with the node.
For grouping messages based upon some criteria,we need to either mention Quantity or Timeout parameter.
So,either we should know the number of messages in a group OR we need to know when we can set the timeout.
Sometimes,we dont want to set both Quantity and Timeout.We just want to group the messages based upon some criteria and based upon some last message criteria in a group.
Eg: Grouping messages based upon MQMD Groupid and Last message identified by LAST Message flag.
We can ofcourse use MQGet node to achieve the same thing.But I want to use Collector node in this.Could some one share information on whether Collector node can support this in some way? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 11, 2014 4:58 am Post subject: Re: Collector node contraint in Grouping messages |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
GeneRK4 wrote: |
We can ofcourse use MQGet node to achieve the same thing.But I want to use Collector node in this.Could some one share information on whether Collector node can support this in some way? |
Why the MQGet node? Why not the MQInput node, which you can pair with a Collector to achieve what you're looking for? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 11, 2014 5:34 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
it's almost as if you wish to build a process that is NP Complete.
What's wrong with setting a timeout of 1,000 years?
What's wrong with analyzing your requirements to make sure you know that they actually are solvable in a finite amount of time and a finite amount of space? |
|
Back to top |
|
 |
Simbu |
Posted: Wed Mar 12, 2014 12:26 am Post subject: |
|
|
 Master
Joined: 17 Jun 2011 Posts: 289 Location: Tamil Nadu, India
|
Have you checked the other two criterias as well? It may be useful for you.
Quote: |
Each event handler controls the acceptance of a message into a collection according to the following properties:
•Number of messages
•Collect messages for a set period
•Match the contents of a correlation path
•Match the contents against a correlation pattern |
|
|
Back to top |
|
 |
GeneRK4 |
Posted: Wed Mar 12, 2014 5:43 pm Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
Though we use MQInput node,as per the Collector node's specification,it looks like we need to definitely specify either Quantity/Timeout albeit we can define Correlation path and pattern.
We cannot set Quantity as it varies for each Collection.
If we set Timeout for 1000 years,then we need to wait for 1000 years to start with the next Collection. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Mar 13, 2014 12:16 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I was faced with this problem a year of so back.
In the end I gave up on the Collector node and wrote every message to a DB table. There was an easily identifiable element in the message that I used for the key. There was also a key table that identified the different groups of messages
Then I setup a timer and read every group record where that not been an update in the last 'n' seconds. I propagated this to a second part of the flow that built a message identical to that output from the collector node and sent it on its way.
The important thing in my application was that a delay of between 30 and 60 second in processing a group on messages was not critical.
The flow has processed something like 20,000 collections every day since Nov 2012 without issue.
As with just about every task in broker there are at least TWO solutions. _________________ 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 |
|
 |
GeneRK4 |
Posted: Thu Mar 13, 2014 12:47 am Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
smdavies99 wrote: |
As with just about every task in broker there are at least TWO solutions. |
I like it |
|
Back to top |
|
 |
|