0 Replies Latest reply on Apr 27, 2019 4:14 PM by navegante

    Setting up Wildfly16 Artemis with MQTT support

    navegante

      Good evening.


      I have been trying to set up Wildfly16 with support to MQTT on JMS.

       

      After two weeks trying to set  the system I have to say I am not been able to

      have the system fully working.

       

      Then I moved to standalone Artemis to get the hang of working with this

      software.

       

      To my surprise my first artemis broker is running. To test configuration I

      have developed small Java clients for JMS queue producer/consumer and MQTT

      publisher/suscriber. So I can exchange messages among all of them.

       

      Trying to do the same in Wildfly I am facing these problems:

       

      -- I can produce/consume to/from a queue from JMS producer/consumer.

      -- I can publish to a queue from a MQTT publisher.

       

      -- I have not been able to subscribe to a queue from a MQTT subscriber.

       

      To discard problems in the Java clients I have used MQTTBOX as well an I

      have the same problem unable to subscribe to a queue from MQTT.

       

      Thanks in advanced.

       

      Follow my standalone-full.xml

       

      <subsystem xmlns="urn:jboss:domain:messaging-activemq:6.0">

       

      ...            

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

                      <in-vm-connector name="in-vm" server-id="0">

                      </in-vm-connector>

       

                      <http-acceptor name="http-acceptor"  http-listener="default"/>

                      <http-acceptor name="http-acceptor-throughput"  http-listener="default">

                      </http-acceptor>         

       

                     <remote-acceptor name="mqtt-acceptor" socket-binding="mqtt">

                      </remote-acceptor>

       

                      <in-vm-acceptor name="in-vm" server-id="0">                    

                      </in-vm-acceptor>

       

                      <jms-queue name="ExpiryQueue"  entries="java:/jms/queue/ExpiryQueue"/>

                      <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>

                      <jms-queue name="jms.queue.Q1" entries="java:/jms/queue/jms.queue.Q1 java:jboss/exported/queue/jms.queue.Q1" durable="true"/>

                      <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>

                      <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector mqtt-connector"/>

                      <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>

         ...

      ...

              <socket-binding name="mqtt" port="1883"/>

      ...

       

      Rafael