Remedy to Java.out.Memory when browsing ActiveMQ JMS Queue that exceed 200,000 messages

Remedy to Java.out.Memory when browsing ActiveMQ JMS Queue that exceed 200,000 messages


After attempting to debug this issue I quickly found out that there was too much data getting sent to the client (browser).  I looked at alternatives like changing the design and then I looked at reusing existing capabilities of the web console. I found out that the web console had an RSS feed that we could leverage if we can get a section (start position and end position) to paginate through the JMS messages in queue. It will be sequential so it may get slow as you go deeper.



Our data can grow and if we want to paginate through it or if we have other applications that would like to reuse some of the consoles functionality they may experience problems such as:

There where other problems that the community resolved but the main problem was that we where sending too much data to the UI. I have experience working with search engines and we had issues like this when our database grow too large. As a result I teamed up with Arthur Naseef to get this quickly and efficiently resolved.

Note: Since the deeper we go into the queue the longer it takes. I've added a progress bar to help our users know something is happening:

This is how the results look when we get back the messages.


I think this will open the doors to new possibilities for our web console. We have a great community driving these efforts. You can expect to see more innovation coming soon.

If you are interested in test driving this new functionality then you can clone my repository:

Note: This new UI will live in "pretty-UI" branch.

This design may appear in later releases but I'm currently in discussion with the community whether this is the direction we want to go.

I will put in a pull request tonight with just the basic pagination and I'm going to only include the code that is required to patch this issue only. The extra UI design will have to wait.

Jira Issue:

Pull Request:

Software Developer | Research Assistant,
Center of Open Technology - Research Department,
Seneca College, Toronto, Ontario


Popular Posts