On 6/19/19 12:13 PM, cooshal wrote:
Hi:
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);
brokerConnection.start();
if (selector == null) {
selector = "";
}
Queue queue = session.createQueue("tst.errors");
queueBrowser = session.createBrowser(queue, selector);
Enumeration e = queueBrowser.getEnumeration();
while (e.hasMoreElements()) {
e.nextElement();
queueEntriesCount++;
}
But, this does not retrieve messages more than 400.
This is expected as the default maxBrowsePage size configuration is
400. See:
http://activemq.apache.org/per-destination-policies.html
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?
Regards,
Cooshal.
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
--
Tim Bish