title: How to monitor message queue message using JMX
body: <p>I am developing an application in which I have jms message queue. </p>
  
  <p>There is a <strong>producer</strong> which enqueue message to the queue and a <strong>consumer</strong> to dequeue the message. </p>
  
  <p>There might be cases when consumer is not running. If a message is not consumed by the consumer within a certain amount of time I need to catch that from <strong>producer</strong>. </p>
  
  <p>I want to use JMX to monitor message queue's message whether it is expired. </p>
  
  <p>Any suggestion or sample code how to this..... </p>