Posted: Wed Oct 31, 2012 5:30 am Post subject: how to iterate over all messages on a queue (> 10000 msgs
Apprentice
Joined: 31 Jul 2012 Posts: 28
how to iterate over all messages on a queue (> 10000 msgs)
1. creating a loop over a MQGet node (browse only) causes BIP2161.
BIP2161: ...this may be caused by message flows containing loops or more than 500 nodes in series...
2. would it be better to create a loop within esql/java compute node
Posted: Wed Oct 31, 2012 5:58 am Post subject: Re: how to iterate over all messages on a queue (> 10000
Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
geewee wrote:
how to iterate over all messages on a queue (> 10000 msgs)
Use an MQInput node.
geewee wrote:
1. creating a loop over a MQGet node (browse only) causes BIP2161.
BIP2161: ...this may be caused by message flows containing loops or more than 500 nodes in series...
Doing a deep browse as here causes an issue. If that browse is in a loop containing an MQGet node that's why your execution group is blowing out. That kind of loop has been discussed in here before, and is typically fatal.
geewee wrote:
2. would it be better to create a loop within esql/java compute node
An ESQL node can't access a queue directly and hence can't loop over a queue. A Java node shouldn't do it, as it will have all sorts of implications for the broker's queue and transaction handling. _________________ Honesty is the best policy.
Insanity is the best defence.
MQinput node will execute the flow once per message.
If you wish to process additional messages inside the same flow execution, use the MQGET node - BUT invoke it using an ESQL loop with PROPAGATE from a compute node so that it does not nest on the stack.
You can use the environment area to signal the compute node to stop looping when you have run out of messages to look at (no msg available).
Watch out for hitting the syncpoint limit if you are actually getting these message from the queue under transactional control.
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