activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cooshal <>
Subject JMS QueueBrowser does not return actual number of messages in the queue
Date Wed, 19 Jun 2019 16:13:05 GMT

I am using ActiveMQ version 5.15.8

I have the following code fragment, which is basically there to count the
number of messages in a particular queue (here, it is tst.errors)

brokerConnection = connectionFactory.createConnection();
session = this.createSession(brokerConnection);

if (selector == null) {
    selector = "";

Queue queue = session.createQueue("tst.errors");
queueBrowser = session.createBrowser(queue, selector);

Enumeration e = queueBrowser.getEnumeration();
while (e.hasMoreElements()) {

But, this does not retrieve messages more than 400. I knew that this was a
problem with the Jolokia API of ActiveMQ. But, I did not realize that there
was similar limitation with JMS API as well. Is there a way to retrieve all
the messages via JMS API?


Sent from:

View raw message