This question comes from here but can be a totally independent question.
I have a unit test with Spring 2.5.2 and activemq 5.2.0. I create a broker (useJmx is true) using "vm://localhost", fire a couple of messages to "myTopic1" open a jconsole to this process and I see MBeans under org.apache.activemq -> localhost -> Topic -> ActiveMQ.Advisory.Producer.Queue.myTopic1. This is the advisory topic (when a producer/consumer joins). But I don't see an MBean dedicated for the myTopic1 itself.
This does not seem to be the case when I run activemq seperately and use my Java program to connect to it. For ex, I downloaded ActiveMQ 5.2.0 altered the activemq.xml to use createConnector=true. I started the activeMQ sent a message to "myTopic1". I fired jconsole connected to using "localhost:1099" and I saw a JMX Bean under org.apache.activemq -> localhost -> Topic -> myTopic1 (In addition to the Advisory topic). This had attributes to tell me how many messages are fired.
Am I missing something here? Why is JMX beans different from vm://localhost (inbuilt broker creation) to the activemq server started locally ?