Announcement Announcement Module
Collapse
No announcement yet.
Spring Messaging Service - Helth Check Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Messaging Service - Helth Check

    I've integrated a Active MQ Server and listing its Queue using Spring JMS.
    It is all configured in the xml, which basically invoke the listener bean method on getting a new message in the queue.
    It is working fine.
    Now I've another requirement to check the health status of the queue from a java class.
    But I dont want to post any new message on the queue.
    Is there any API available by which I can only check the connectivity of the queue? Or any api to do an informational query to the queue (like number of message in the queue)?
    In JMS we can create the session using the connection pool by context lookup, that kind of thing also do for me. But I'm not able to do so in Spring as it abstracts the session creation in xml.
    Any help on this?

    Thanks,
    Arpan

  • #2
    You might want to simply expose the ActiveMQConnectionFactory as an MBean by adding <context:mbean-export/> in your Spring configuration.

    Comment


    • #3
      MBean will be good option but will be too heavy for my requirement.
      Is there any way, that I can only check the status of the connectivity of the queue from my Java Code?

      Comment


      • #4
        Actually, if you use Spring's MBeanProxyFactoryBean, you can have a very lightweight view of the MBean. You would only need to implement a simple interface with only the methods that you're interested in (e.g. get queue size, consumer count, etc.). Here's the documentation: http://static.springsource.org/sprin...html#jmx-proxy

        Comment

        Working...
        X