简体   繁体   English

在MQTT中,我可以向单个客户端发送消息吗? 还是仅在主题中?

[英]In MQTT, can i send a message to single client? Or only in a topic?

I have an application using MQTT, with clients connected on various topics, however, I have the need to send a message only to a client, not to an entire topic. 我有一个使用MQTT的应用程序,客户端连接了各种主题,但是,我只需要向客户端发送消息,而不是整个主题。 Is that possible? 那可能吗?

No, MQTT is a pub/sub protocol, messages are published on topics and there may be 0 to many subscribers to that topic 不,MQTT是一种发布/订阅协议,消息是在主题上发布的,该主题的许多订阅者可能为0

The closest you can do is pick a topic that you know only the client you want will be subscribed to. 您能做的最接近的事情是选择一个仅知道您要订阅的客户端的主题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM