I use ActiveMQ in a .NET program, and I have flooded it with event messages.
In short, when I get the event queue 'onMessage (IMessage receivedMsg)' I put the message in the internal queue from which the X-threads do their work.
At first I had: "AcknowledgementMode.AutoAcknowledge" when creating the session, so I assume that all messages in the queue were pulled and placed in the memory queue (which is risky because everything is lost with the crash).
So, I used: "AcknowledgementMode.ClientAcknowledge" when creating a session, and when the worker was ready with the message, it calls the "commit ()" method in the message. However, all messages are sucked out of the queue.
How can I configure it so that ONLY the number of messages X is processed or is in the internal queue, and that not everything is immediately "loaded"?
source
share