ActiveMQ: Browsing queues with slashes in their names

If you use forward slashes in your queue names and have tried to use ActiveMQ’s queue browsing functionality (see, you know it doesn’t work. The problem is that it’s re-writing your call to the queue and replacing your slashes with periods. Check out the getQueue method of the QueueBrowseServlet that handles this and you’ll see this:

uri = uri.replace('/', '.');

There’s no configuration option to get around that – it just bluntly rewrites your URLs to point at queues with periods. Remove that line, recompile the activemq-web jar, and you’ll be able to browse /your/previously/unbrowsable/queue easily!