Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActiveMQ JMS ping

Tags:

java

activemq

Apache Activemq 5.2.0

My application listens to messages on three topics and sends messages on 2 topics. When my application is "webping"ed, I want to check if these topics are alive. I would like to know if this is possible. Here are my observations,

  1. Advisory messages can be used for this, but they send messages only when a producer/consumer joins. This is not quite what I want. I just want to check if I can send messages to outbound topics and can receive messages on the inbound topic.
  2. Custom Heartbeat solution. I can make every producer send a heartbeat message say every 5 seconds and the listener to not process heartbeat messages but update a flag/timestamp. That way I know the topic is up and running.
  3. Is there a heartbeat kinda thingi inbuilt in the Apache ActiveMQ? or a "ping for a topic" ?

I understand JMS is not for monitoring but if I am a producer for a topic, it will be good to know if I can produce on the topic with reasonable comfort level. I also agree between a ping and a message the channel can go down and that is an acceptable failure for me.

I just want a health check system/page which can say "yes topics are there and the activemq is running"

like image 716
Kannan Ekanath Avatar asked Feb 23 '10 14:02

Kannan Ekanath


1 Answers

You can monitor ActiveMQ using JMX. This will allow you to see if the server is up, what topics/queues are active and a lot of other useful information.

like image 55
Kevin Avatar answered Sep 28 '22 16:09

Kevin