jasonrbriggs / stomp.py

“stomp.py” is a Python client library for accessing messaging servers (such as ActiveMQ or RabbitMQ) using the STOMP protocol (versions 1.0, 1.1 and 1.2). It can also be run as a standalone, command-line client for testing.
Apache License 2.0
495 stars 167 forks source link

Multiple subscriptions #340

Closed the01 closed 3 years ago

the01 commented 3 years ago

Is it designed to have multiple subscriptions (e.g queue1 and queue2) on one connection?

In my tests I subscribe to queue1 and then queue2 and split my messages evenly between both. What I then see, is that it will continuously receive the message for queue2 and every x seconds (~1 minute/~30 msgs) a bulk for queue1 (or the other way around). This mostly happens when there are plenty of messages in the queue.

Is this intended? I would have expected that it takes one messages from queue1 and one from queue2. Or is this an ActiveMQ issue entirely?

kannanF9T commented 3 years ago

Please try to set "activemq.prefetchSize":1 in subscribe method headers={"activemq.prefetchSize":1}

the01 commented 3 years ago

Ah, I had this for commented out for some reason. But works now, thank you!