Hi Justin

Thank you for yours advise. It gave me the clue to solve the problem.
Setting the Wildfly log to debug provided usefull info.

After an in deep reading of  Apache Artemis user manual, and having carried
out many tests and configurations on both, standalone and wildfly16
embedded, I have been able to run the Artemis in Wildfly with Mqtt support.

As I mentioned in my original question there was impossible to subscribe to
a queue or topic from mqtt client, however it was possible to send messages
to that queue/topic.

If you read the Artemis manual, the information regarding the subscriptions
to queues or topics clearly explains how subscription and publishing it is
carried out.

In Artemis there are addresses and queues, the topic concept does not
exists.

If autocreate-address and autocreate-queues is enabled, clients when publish
will create the addresses and queues.

The clients when subscribe will create address and queues as well. If there
is more than one subscribers each one will create an queue attached to the
address.

So when a client publish, sends messages to the address and Artemis routes
the messages to the attached queues.

There are statics addresses and queues that are defined in broker.xml. A
client can subscribe to those static addresses and will create a dinamic
queue each one to receive messages. Or If the programmer desires can code
the client so as to attached to a static queue defined in broker.xml by
means of the fully qualyfied name.

broker.xml  static addres and queue
 </address>
     <address name="test">
            <multicast>
               <queue name="T1" />
            </multicast>
    </address>

client, field for fully qualyfied name 
  private String topic = "test::T1";

So in conclusion if you want to subscribe to a Wildfly16 Artemis from a Mqtt
client you should set the standalone-full.xml to allow autocreation of
queues.

<address-setting name="#" dead-letter-address="jms.queue.DLQ"
expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760"
page-size-bytes="2097152" message-counter-history-day-limit="10"
auto-create-queues="true" auto-delete-queues="true"
auto-create-addresses="true" auto-delete-addresses="true"/>

And that is all, allow the clients to create their own queues atached to the
addresses.


Now I will try to set SSL support for Artemis in Wildfly16

Rafael




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply via email to