Posted: Fri Jul 24, 2009 3:28 am Post subject: Fetching all the messages from a particular node using MQGet
Novice
Joined: 03 Jul 2009 Posts: 14
Hi,
I have a pub sub flow where i am publishing and in a reply to Q, the response for the publication is sent.
I need to read those responses in my flow using MQGet and send those responses to the intended recipient
But the problem is MQGet will read a single message from the queue.What can be done so that it reads on the messages will we have them on the queue?
If you can process them independently, use MQinput to drive a flow for each message. This is the conventional and best approach.
If you want to read a queue until empty in a single flow execution you can use a propagate loop in a compute node to drive a MQGET node multiple times (and have the "no message available" condition communicated back in a shared variable to terminate this loop).
You can loop a MQGET using WMB wiring loops but you tend to get stack overflow errors (see threads on this subject).
Last edited by zpat on Fri Jul 24, 2009 6:09 am; edited 1 time in total
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