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



Diagnosis:


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.


http://localhost:8161/admin/queueBrowse/TEST?view=rss&feedType=atom_1.0&start=0&end=2





Problem:

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.








Solution:
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.






Conclusion:

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:

https://github.com/zmhassan/activemq.git

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:
https://issues.apache.org/jira/browse/AMQ-5024

Pull Request:
https://github.com/apache/activemq/pull/16


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

Comments

Popular Posts