title: ActiveMQ: how to programmatically monitor embedded broker
body: <p>I want to monitor an embedded ActiveMQ 5.8 broker from inside the code.</p>
  
  <ul>
  <li>How can this be done?</li>
  <li>Do I need a JMX connection? I want to prevent exposing JMX</li>
  <li>Is there a way of accessing <a href="http://activemq.apache.org/maven/5.8.0/apidocs/org/apache/activemq/broker/jmx/package-summary.html" rel="nofollow"><code>org.apache.activemq.broker.jmx</code></a> Beans without JMX?</li>
  <li>Are there Hooks, Listeners, Events, ... that can be attached to the broker itself?</li>
  <li>If this is a really bad idea, why?</li>
  </ul>