0 Replies Latest reply on Apr 14, 2019 7:23 AM by Felipe Fraga

    Wildfly 13 and remote 2.6.x Artemis queue auto creation issue

    Felipe Fraga Newbie

      Hello,

       

      I am trying to connect to a Remote 2.6.4 Artemis server from a Wildly 13 application server. I can set it up using Wildly 16 and I noticed that the Wildly 13 has Artemis 1.5.5 and Wildly 16 has Artemis 2.6.3.

       

      I don't have any queues created on the server and it is configured to auto create address and queues.

       

      When I try to produce messages to the queue, it gives no error, I see a session for the producer on the Artemis console, but the queue never appears on the console as it was never created. I also can't connect listeners to it.

       

      If I explicitly declare the queue on the broker.xml it works fine.

       

      I am using the core acceptor, and tried adding the compatibility prefix configuration to it (although it works without it with explicitly declared queues) but without success.

       

      Here is my relevant snippets from standalone.xml:

       

                     <remote-connector name="remote-artemis" socket-binding="remote-artemis"/>

                     ...

                      <pooled-connection-factory name="remote-artemis" entries="java:/jms/RemoteConnectionFactory java:jboss/DefaultJMSConnectionFactory" connectors="remote-artemis" transaction="xa" user="user" password="secret"/>

                      ....

                      ...

              <subsystem xmlns="urn:jboss:domain:naming:2.0">

                  <bindings>

                      <external-context name="java:global/federation/messaging/broker" module="org.apache.activemq.artemis" class="javax.naming.InitialContext">

                          <environment>

                              <property name="java.naming.factory.initial" value="org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory"/>

                              <property name="java.naming.provider.url" value="tcp://localhost:61616"/>

                              <property name="queue.queues/ExampleQueue" value="ExampleQueue"/>

                          </environment>

                      </external-context>

                      <lookup name="java:/jms/queue/ExampleQueue" lookup="java:global/federation/messaging/broker/queues/ExampleQueue"/>

                  </bindings>

                  <remote-naming/>

              </subsystem>

              ...

              ...

              <outbound-socket-binding name="remote-artemis">

                  <remote-destination host="localhost" port="61616"/>

              </outbound-socket-binding>

       

      And I am injecting and producing messages like these:

       

          @Inject

          @JMSConnectionFactory("jms/RemoteConnectionFactory")

          private JMSContext context;

       

          @Resource(lookup="java:/jms/queue/ExampleQueue")

          private Queue queue;

       

      And my MDB looks like this:

      @MessageDriven(name = "ExampleMDB", activationConfig = {

              @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "queues.queue/ExampleQueue"),

              @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),

              @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")})

       

       

      Can anyone tell what I am missing? Thanks in advance.