title: Determine number of subscribers per topic in JMS
body: <p>I'm building a small statistics application for Java Message Service. I have a container with several topic and loads of subscribers (consumers) to each topic.</p>
  
  <p>JMS provider: SonicMQ</p>
  
  <p>I've gotten the program to the state where I:</p>
  
  <ol>
  <li>Create a session</li>
  <li>Create a MessageConsumer to the topic</li>
  <li>Listen for messages</li>
  <li>Collect the statistics</li>
  </ol>
  
  <p>And it's working ok.</p>
  
  <p>But a key piece of the program is missing: How to determine the number of subscribers a certain topic has?</p>
  
  <p>I've plowed through the JMS documentation, but to no avail. I was hoping maybe someone has battled this windmill before... Any ideas or a confirmation that it cannot be done welcome.</p>