Open nagybar opened 1 year ago
You certainly can do Get calls across multiple queues & queue managers in the same program. I've just run a simple test and can see the messages being delivered from the different queues.
But there are several polling controls to try to give a "fair" opportunity while still being responsive to both existing and newly-arrived messages - we don't want to spin through all of QM1's messages before trying to get them from QM2 for example. We also don't want to be hogging all of the Node engine, not allowing other pieces of the application to execute. The getLoopPollTimeMs
tends not to be the most relevant control once you have more than one queue open (regardless of whether they are on the same qmgr or different).
So you might want to try playing with the getLoopDelayTimeMs
tuning parameter as an additional control. And there is also the maxConsecutiveGets
which will add further delays or switches to other queue handles.
The current heuristics generally seem to balance fairly across a number of queues and queue managers, with the tuning parms giving that extra level of control. But of course you can always implement your own polling with GetSync if you find the current model doesn't match your requirements.
The polling mechanism doesn't work properly if I connect to more than one queue manager from the same NodeJS application.
If I connect to two different MQs the
LoopPollTimeMs
tuning parameter does not apply when using themq.Get()
method and polling runs without waiting. Otherwise, it reads the messages from the queues.I get the same error when I connect to the same QM and poll (mq.Get) two queues.
My environment:
My questions: