You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Huan <xi...@hotmail.com> on 2018/11/09 17:46:46 UTC

How MQTT consumer consume virtual topic which is queue in ActiveMQ?

ActiveMQ virtual topic is actually put the message produced by publisher in a
queue, the message will be distributed to multiple consumers evenly who
connect to the queue.

my consumer is using MQTT, but there is no queue concept in MQTT, but only
subscribe/publish concept, then how can MQTT client get the virtual topic in
the queue?  

I tried to subscribe the virtual topic, but I did not get the publish
message.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html

Re: How MQTT consumer consume virtual topic which is queue in ActiveMQ?

Posted by Huan <wo...@hotmail.com>.
I need 'get queue semantics (competing consumption across 
multiple consumers) out of this subscription'.  

Because I have multiple MQTT consumer clients which work in loadbalance, one
of the client consume the message is enough. That is why need to use virtual
topic concept. But I do not know how MQTT client can connect to a queue..





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html

Re: How MQTT consumer consume virtual topic which is queue in ActiveMQ?

Posted by Arthur Naseef <ar...@amlinv.com>.
Are you looking to get queue semantics (competing consumption across
multiple consumers) out of this subscription, or topic semantics (every
consumer gets every message)?

If the later, then you may be able to directly subscribe to the virtual
topic itself, as a regular topic - because it still works as a regular
topic.  I say _may_ because sometimes ActiveMQ gets configured to prevent
flow of the virtual topic itself (generally to avoid problems with
duplicating messages in a network-of-brokers).

If the need is to get queue semantics, I don't know.  Perhaps someone more
knowledgeable with MQTT can answer that.

Art


On Fri, Nov 9, 2018 at 11:19 AM Huan <xi...@hotmail.com> wrote:

> ActiveMQ virtual topic is actually put the message produced by publisher
> in a
> queue, the message will be distributed to multiple consumers evenly who
> connect to the queue.
>
> my consumer is using MQTT, but there is no queue concept in MQTT, but only
> subscribe/publish concept, then how can MQTT client get the virtual topic
> in
> the queue?
>
> I tried to subscribe the virtual topic, but I did not get the publish
> message.
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
>