0 Replies Latest reply on Oct 9, 2013 9:23 AM by Radai Rosenblatt

    HonetQ creates 2 queues for JMS Topic?

    Radai Rosenblatt Newbie



      I'm doing a JMX monitoring PoC using wildfly beta1.

      the project is an *.ear deployment with 2 ejb modules. one ejb module generates activity and the other measures performance metrics using JMX.

      in the load-generating ejb module, i have the following under /META-INF/hornetq-jms.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <messaging-deployment xmlns="urn:jboss:messaging-deployment:1.0">
                  <jms-queue name="ConstantLoadQueue">
                      <entry name="/queue/ConstantLoadQueue"/>
                  <jms-topic name="ConstantLoadTopic">
                      <entry name="/topic/ConstantLoadTopic"/>


      i also have a @Startup @Singleton with a @Scheduled method to fire messages to the 2 above destinations and 2 MDBs - one to consume from each destination. the MDB that onsumes the topic looks like this:


      @MessageDriven(activationConfig = {
              @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
              @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/ConstantLoadTopic"),
              @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
      public class ConstantLoadTopicMDB implements MessageListener{
          public void onMessage(Message message) {
              try {
                  System.err.println("Message from ConstantLoadTopic: "+((TextMessage)message).getText());
              } catch (JMSException e) {
                  throw new IllegalStateException("while receiving message",e);


      both of my MDBs trigger correctly and receive the messages. the problem is that when i connect a JMX client to wildfly i see 2 JMX entries for the topic, one under the topic name, which has a __HQX=-1 filter and looks to be idle (all counters are 0) and a second under a randomly-generated name that appears to be the "real" topic:


      both of these have the same value for the "queueAddress" attribute.


      why is this happenning? is this the expected behaviour for topics? if so can i just disregard any JMX queue/topic entry with the "__HQX=-1" filter?