Reputation: 1615
I have a queue containing almost 250,000 messages. I'd like to iterate through the messages without removing them. I've used QueueBrowser
for this, but it makes only the first 200 elements available. QueueBrowser
's Javadoc explains that it "peeks" at messages from the queue.
Upvotes: 1
Views: 1070
Reputation: 18356
The issue lies in the Destination Policy in play for your broker. By default the broker will only page in 200 message for a browser to avoid using up all available memory and avoid impacting overall performance. You can increase this number via your own DestinationPolicy in activemq.xml, see the documentation page here.
Upvotes: 2