0
votes

I am observing an odd behavior that I cannot explain. My application uses Spring Boot to access ActiveMQ Artemis and produce and consume messages which works fine.

However, when I try to use browse on a queue that my application is listening to neither my browse call nor the Artemis management console can enumerate the queue contents if message count is approximately lower 1000. For greater message count or when I stop the queue listener then it works. Why is this happening?

1

1 Answers

3
votes

My hunch is that this is being caused by the message buffer on the client. The client will normally buffer lots of messages from the broker as a performance optimization because performing a network round-trip to get every single message can be very slow. From the broker's perspective messages which are in this state are "in delivery" (i.e. they've been sent to a client but have not yet been acknowledged by the client). Messages in this state are not available to be browsed. Once there are enough messages in the queue to exceed the client's buffer size (which appears to be around 1,000 in your case) then you'll start to see those messages with a browser. If you don't want this performance optimization for your clients you can disable it by setting consumerWindowSize=0 on the client's URL (e.g. tcp://127.0.0.1?consumerWindowSize=0).