Azure 主题并通过 MQTT 发送消息

标签 azure mqtt azure-iot-hub azure-servicebus-topics

是否可以通过 mqtt 将消息发送到 azure 的任何自定义主题。到目前为止我发现的所有示例都适用于标准主题

'devices/' + hubName + '/messages/events/'
'devices/' + hubName + '/messages/devicebound/#'

顺便说一句,我尝试使用 MQTT.fx 应用程序发送/订阅上面的主题/订阅,但从未收到消息,尽管连接成功。

最佳答案

devices/{device_id}/messages/devicebound/# 的主题过滤器是订阅从 IoT Hub 接收消息(云到设备消息),它认为您需要了解其中的区别关于 here 的设备到云消息和云到设备消息。 devices/{device_id}/messages/events/ 的主题用于从设备发送设备到云消息。

您可以使用Device Explorer来测试这个问题。当您使用该工具向设备发送消息时,MQTT.fx 将收到该消息。

enter image description here

关于Azure 主题并通过 MQTT 发送消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51104579/

相关文章:

android - wifi关闭并再次打开时Websocket重新连接问题

azure - 如果 IoT 中心重新启动,设备是否会重新连接?

Azure 表存储逆关系

azure - 设置变量策略 : Expression return type is not allowed

wpf - PublicClientApplication - AcquireTokenInteractive - 组成员资格

swift - [MosquittoClient initWithClientId :]: unrecognized selector sent to instance

azure - ARM 模板 API 管理部署策略内容

stream - 创建一个每 X 秒发出一次元组的 Apache Storm spout

Azure 逻辑应用程序 - 如何重新启动失败的操作?

c# - Azure sb lite 连接字符串和事件中心兼容名称