Author |
Message
|
phaniIIB |
Posted: Mon Apr 25, 2016 7:30 am Post subject: Usage of Collector Node |
|
|
Acolyte
Joined: 28 Jul 2015 Posts: 51
|
Hi all,
I have a use case where I will have to collect the incoming messages for 1 sec and then propagate the messages. I used Collector node for the same but I face an issue.
I used MQInput --> Collector --> MQOutput
Collector : 1 Input terminal
Collection definition table : Input, quantity : 0, Timeout : 1
Rest of all are default
===== The issue is that I do receive the messages in the output MQ from Input but all of them are empty. I am sure I am missing something. Can anyone help.
Thanks in advance, |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Apr 25, 2016 9:38 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
How have you setup the collector node?
What constitues 'the end of the collection'?
Have you used trace nodes everywhere to see if you are actually setting up the inputs fo the collection properly?
IMHO, the Collector Node is about the most awkward frustrating node in the toolbox. A real PITA. I've been using it since 2010 in a variety of applications. The Only time I've managed to get it working correctly (and for months at a time) was with two fixed inputs.
For unbounbed collections I wrote my own DB based solution. Unbounded means that you don't know how many items make up the collection. In one system the number of messages can range from 1 to 35! _________________ 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 |
|
 |
Vitor |
Posted: Mon Apr 25, 2016 9:55 am Post subject: Re: Usage of Collector Node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
phaniIIB wrote: |
===== The issue is that I do receive the messages in the output MQ from Input but all of them are empty |
You need to explain a little more I think.
So you're taking messages from an MQInput node and feeding them to a Collector set to a 1 second timeout. At the end of the second, do you get 1 empty message or (as I think you're saying) the same number of blank output messages are there are input messages.
If the latter, functioning as designed. You're feeding messages into the Collector node with no configuration that indicates that all of these messages are supposed to form a single collection. So the Collector node starts 1 new collection per message. All these collections time out after 1 second and go down to the MQOutput node, where there's no OutputRoot for the MQOutput to serialize into a message, because that's not where the Collector puts it.
You need to re-read the description of the Collector node and use it properly, or better still re-work this stupid design. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
phaniIIB |
Posted: Mon Apr 25, 2016 10:12 am Post subject: |
|
|
Acolyte
Joined: 28 Jul 2015 Posts: 51
|
Firstly,
This is not a design. This is a POC.
I am propagating non-empty messages which are propagated as empty messages into MQ Output.
So where does the collector puts its message if not to Output Root. Can you please elaborate. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 25, 2016 10:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
phaniIIB wrote: |
This is not a design. This is a POC. |
So you've proved the concept is duff. Congratulations.
phaniIIB wrote: |
I am propagating non-empty messages which are propagated as empty messages into MQ Output. |
And not collected together I'll warrant. If so, your POC is in fact successful if you're trying to develop a more cumbersome Timer node.....
phaniIIB wrote: |
So where does the collector puts its message if not to Output Root. Can you please elaborate. |
As described here.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ksrocks9 |
Posted: Mon Apr 25, 2016 1:12 pm Post subject: |
|
|
Apprentice
Joined: 11 Mar 2015 Posts: 35
|
|
Back to top |
|
 |
maurito |
Posted: Mon Apr 25, 2016 7:53 pm Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
phaniIIB wrote: |
So where does the collector puts its message if not to Output Root. Can you please elaborate. |
The collector node is well documented in the Knowledge Centre. Read about it, experiment with the supplied sample, and then you can ask what did you do not understand.
You will need more than MQInput -> collector -> MQOutput. |
|
Back to top |
|
 |
joebuckeye |
Posted: Tue Apr 26, 2016 3:47 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
phaniIIB wrote: |
So where does the collector puts its message if not to Output Root. Can you please elaborate. |
Use the Info Center as others have suggested or you could put in a trace node after the Collector node and see for yourself. |
|
Back to top |
|
 |
|