Tuesday, October 14, 2014

Quick Tutorial on ActiveMQ Web Console In 5 minutes

There are some basic operations when developing with ActiveMQ:

All these operations can be done by using a web browser, because ActiveMQ broker provides a web console default on port 8161. For example if you run your ActiveMQ broker:

# ACTIVEMQ_INSTALL_DIR is the path where you install ActiveMQ
ACTIVEMQ_INSTALL_DIR/bin/activemq start

Then you can access the web console  from url http://localhost:8161/admin. Replace the 'localhost' to the server's IP if you try to access the ActiveMQ web console remotely.


image


Browse all Queues (Queues List)


Click the Queues menu or access Http://localhost:8161/admin/queues.jsp , all queues will list out.


image


The highlight "3" means there are 3 messages in the broker waiting to be received.


Browse  all messages in a Queue (Message List)


From Queues List page, You can click a queue's name to browser all messages pending in that queue.


image


Check detailed information of any message


Click on the message Id, then you can see the details of the message. A message is composed by message header and message body.  image



Create a Message manually from web


If the destination queue exists, then from the queue list page, click the Send To link. If the destination queue does not exists, you can click Send from the menu, and give a name of the destination, the queue will be create automatically when sending message.


image


Type the text content, then click send .


image


Delete a specified message in a Queue


From the message list of the Queue, click Delete to remove message.


image


Delete all messages of a Queue


From the Queue list, click Purge.


image

4 comments:

  1. How can i see the queue created by program like
    session.createQueue("test");
    now how can i see 'test' queue in web console

    ReplyDelete
    Replies
    1. After you successfully create the queue, you can find it in the 'queue' view by click the menu 'Queue'.

      BTW, you don't need to create queue explicitly, just send to or recv from a non-exist queue is ok, ActiveMQ will create it for you automatcally.

      Delete
  2. Have activemq broker running, and launching java examples.
    Messages on sys.out for Listener and Producer show up fine.
    My problem is I can't find a nice way via the web admin console to see the content of messages enqueued. I can see that they're getting enqueued because the stats keep incrementing, but if I click on the topic name, it only shows me a form for sending a message to that topic...

    ReplyDelete
    Replies
    1. If you are using activemq in topic-subscriber way, you can't see the message content from web console. A solution may be add a logger as subscriber to always save the message in file or db by the logger.

      Delete

Powered by Blogger.

About The Author

My Photo

Has been a senior software developer, project manager for 10+ years. Dedicate himself to Alcatel-Lucent and China Telecom for delivering software solutions.

Pages

Unordered List