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

7 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. Hi Sheng,
      I can create queue, publish message to the queue and consume it too.
      But the queue is not visible in the console... please tell me a solitio .

      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
  3. How to associate a property to the message before clicking the send? For example, I want to send the message "Successful" with a property "Result" set to "Submitted successfully". How do I do that from activeMq web console

    ReplyDelete
  4. I need Notification script if messages crossing 1000 pending , either email or mobile message required from Active MQ. Please help me . my email id : dbavizag@gmail.com

    ReplyDelete

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