Emqx: Send a message to single or multiple client_id without topic

Created on 16 Sep 2018  路  3Comments  路  Source: emqx/emqx

Environment

Description

How may i send a message to single client id or multiple client ids without connecting to any topic ? is this even possible in emqtt ? i have heard mqtt protocol does not support my senario .
another question : is there any way to publish message to some client ids not all of them in a specific topic ? i guess it just accept one single client at the time.

question

Most helpful comment

Hi @nerdial

According to MQTT spec, messages are always published to topics,
never published targeting any specific client-id.
One can of course use unique topic to make it work like an 'id'.
As far as I know, emqx does not support anything special in this regard.

To your second question (not sure if I completely follow though):
Messages are broadcasted to all clients who subscribes to that specific topic
(or wildcard topic which matches the producer's target topic).
One exception is shared-subscription, if two or more clients subscribe to the same group,
messages are randomly delivered to one of the clients in the group.

All 3 comments

Hi @nerdial

According to MQTT spec, messages are always published to topics,
never published targeting any specific client-id.
One can of course use unique topic to make it work like an 'id'.
As far as I know, emqx does not support anything special in this regard.

To your second question (not sure if I completely follow though):
Messages are broadcasted to all clients who subscribes to that specific topic
(or wildcard topic which matches the producer's target topic).
One exception is shared-subscription, if two or more clients subscribe to the same group,
messages are randomly delivered to one of the clients in the group.

@nerdial, Hi As @spring2maz explained, the MQTT protocol does not support it.

this is the "MQTT P2P" scenario, your client can subscribe one private topic, means one client one topic. you can publish to any topic as your client.

My question is "How to publish same msg to multiple topic one time"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SumitFlochat picture SumitFlochat  路  3Comments

reejinbouk picture reejinbouk  路  4Comments

louisburton picture louisburton  路  4Comments

jbrzozoski picture jbrzozoski  路  4Comments

franquis picture franquis  路  5Comments