• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to check the status of the activemq broker  RSS feed

 
sam liya
Ranch Hand
Posts: 1269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to check the status of the activemq broker before the messages sent. I am using activemq with Spring. Please let me know the way to do this
 
sam liya
Ranch Hand
Posts: 1269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually my usecase is i need to handle the broker not available situation. So i need to know the status of the broker ? i tried to find any listeners available , but not found yet?
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you try to send a message and the broker is not available, then you will get an exception thrown, won't you? So handling this expression should take care of the problem, no?
 
sam liya
Ranch Hand
Posts: 1269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No paul, it will not generate a exception. I am using Spring with ActiveMQ using ProducerTemplate  as below. So it keep trying send the message to the broker. It will not generate exception.



Below is the what i am getting, it will not go to the exception. It wait "tepm.sendBody("direct:a", string);" line and keep trying to send message.

 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, then, I don't know. But infinite retries are a problem (as you can see). I would talk to the person who configured it that way (or the person who knows about setting it up) and ask them to do something different.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!