This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

how to check the status of the activemq broker  RSS feed

 
Ranch Hand
Posts: 1292
  • 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: 1292
  • 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?
 
Sheriff
Posts: 23867
50
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: 1292
  • 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: 23867
50
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.
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
Download Free Java APIs to Work with Office Files and PDF
htttp://www.e-iceblue.com/free-apis.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!