Posted: Wed May 28, 2008 3:30 am Post subject: WMB using Message Group Question
Novice
Joined: 28 May 2008 Posts: 19
I have a requirement to process groups of messages and combine them into one message to be sent downstream. I am looking for design ideas.
My first thought was to use an MQInput node with logical order and All messages available checked. Then if the MQMD Message Flag is not the last message write the message out to another queue. If the Message Flag is set to Last Message in Group, use an MQGet Node and a loop to get all of the messages in this group and build a structure in memory to combine all of the parts. Then propagate it downstream.
One issue I see with this method is that the original input queue can only have 1 Instance running, so there are Performance/Scalability concerns there.
Its an interesting question. I have been playing with this a little now and here is what I think:
1) Collector node will not work - or at least I couldn't think of a way to use it. The node needs a quantity - how many msgs form the collective ? We don't know this. So we don't know when to stop looking for messages.
2) The MQInput node does not read the msg until the last message of the group has arrived in the queue. Perhaps there is a setting that will change this - but I couldn't find it.
So, knowing that - I would just say use SHARED variables or a Cache Node to store these messages in memory and join them all when you detect a last msg in the MQMD.MsgFlags (all this in a compute node).
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
using a shared variable is a bad idea because there will be lot of messages coming in and configuring a cache node is too complex.I request the source system to include all the messages bind them into one big message and put it on a queue or let them insert all the messages into a temporary table and trigger the message flow using a cronjob and get all messages from the table and process.
Joined: 10 Nov 2006 Posts: 53 Location: IBM Bangalore
That would be a better idea but how do we know that the last record arrived and trigger the message flow using the cronjob.
I think the better way is the source system should club all the messages into a single big message and put on a queue. _________________ TRY TRY UNTIL U SUCCEED
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