当前位置: 首页 > 知识库问答 >
问题:

RSMB不承认带有MQTT-SN的发布消息

郑乐池
2023-03-14

我运行的是支持MQTT-SN的非常小的Message Broker(RSMB)1.3.0.2。我有一个Arduino客户端通过MQTT-SN协议与它交谈。

    null
               Client connects 
20150227 152211.587 132 127.0.0.1:55701  <- MQTT-S CONNECT cleansession: 0
20150227 152211.587 1998536376 127.0.0.1:55701 XinoRf_1 -> MQTT-S CONNACK returncode 0 (0)
20150227 152211.588 CWNAN0000I Client connected to udp port 1885 from XinoRf_1 (127.0.0.1:55701)
               Here start 1st topic registration and acknowledgment - its id is 1  
20150227 152211.678 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S REGISTER msgid: 1 topicid: 0 topicname: net/mf/ha/
20150227 152211.678 132 127.0.0.1:55701 XinoRf_1 -> MQTT-S REGACK msgid: 1 topicid: 1 returncode: 0 (0)
               Here starts send and acknowledge of a 1st message in topic 1                                                            
20150227 152211.753 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S PUBLISH msgid: 2 qos: 1 retained: 0
20150227 152211.753 1998536376 127.0.0.1:55701 XinoRf_1 -> MQTT-S PUBACK msgid: 2 (0)
               Here start 2nd topic registration and acknowledgment - its id is 2
20150227 152211.753 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S REGISTER msgid: 3 topicid: 0 topicname: net/mf/ha/
20150227 152211.846 132 127.0.0.1:55701 XinoRf_1 -> MQTT-S REGACK msgid: 3 topicid: 2 returncode: 0 (0)
               Here starts send and acknowledge of a 1st message in topic 2
20150227 152211.921 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S PUBLISH msgid: 4 qos: 1 retained: 0
20150227 152211.921 1998536376 127.0.0.1:55701 XinoRf_1 -> MQTT-S PUBACK msgid: 4 (0)
               Here start 3rd topic registration and acknowledgment - its id is 3    
20150227 152212.005 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S REGISTER msgid: 5 topicid: 0 topicname: net/mf/ha/
20150227 152212.005 132 127.0.0.1:55701 XinoRf_1 -> MQTT-S REGACK msgid: 5 topicid: 3 returncode: 0 (0)
               Here starts send and acknowledge of a 1st message in topic 3
20150227 152212.080 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S PUBLISH msgid: 6 qos: 1 retained: 0
20150227 152212.080 1998536376 127.0.0.1:55701 XinoRf_1 -> MQTT-S PUBACK msgid: 6 (0)
               Here Arduino sends disconnect request with duration 4000 (it does not matter what value is sent here, behaviour is same)
20150227 152212.080 1998536376 127.0.0.1:55701 XinoRf_1 <- MQTT-S DISCONNECT duration: 4000
20150227 152212.461 CWNAN0038I Disconnection request received from client XinoRf_1
20150227 152212.461 132 127.0.0.1:55701 XinoRf_1 -> MQTT-S DISCONNECT duration: 0 (0)
                At this point Arduino sleeps appprox. 4 seconds

                Arduino reconnects with clean session 0 - I believe all previous registrations should be kept by the broker
20150227 152217.519 132 127.0.0.1:55701  <- MQTT-S CONNECT cleansession: 0
20150227 152217.519 1998536376 127.0.0.1:55701 XinoRf_1 -> MQTT-S CONNACK returncode 0 (0)
20150227 152217.519 CWNAN0000I Client connected to udp port 1885 from XinoRf_1 (127.0.0.1:55701)
                At this point Arduino is connecte

                Here starts send a 2nd message in topic 1 - message never gets acknowledged by the broker.
20150227 152217.603 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S PUBLISH msgid: 7 qos: 1 retained: 0
                Following messages are resent by the client
20150227 152232.595 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S PUBLISH msgid: 7 qos: 1 retained: 0
20150227 152247.575 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S PUBLISH msgid: 7 qos: 1 retained: 0
20150227 152301.577 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S PUBLISH msgid: 7 qos: 1 retained: 0
20150227 152317.536 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S PUBLISH msgid: 7 qos: 1 retained: 0
20150227 152332.516 132 127.0.0.1:55701 XinoRf_1 <- MQTT-S PUBLISH msgid: 7 qos: 1 retained: 0
    null

米哈尔

共有1个答案

诸葛砚
2023-03-14

修正的RSMB版本可在

  1. GitHub:https://github.com/michalfoksa/rsmb
  2. 或作为Eclipse Bugzilla中的修补程序:https://bugs.Eclipse.org/bugs/show_bug.cgi?id=424704
 类似资料:
  • 更新时间:2019-10-31 10:56:59 节点简介 MQTT发布节点用于将设备的消息进行下发,自定义消息包,获取设备的信息,设备的动态 使用场景 使用MQTT发布节点,可以自定义提醒内容,下发设备的状态数据,下发设备信息,方便用户获取设备的信息,通常用于获取设备信息。 配置项 心跳配置 CONNECT指令中需包含Keep Alive(保活时间)。 保活心跳时间取值范围为30至1200秒。如

  • 我正在尝试编写一条路由,将消息转发到这样的sedaendpoint 还有另一个从seda终结点消耗的路由: JMS连接工厂的JMS确认模式是CLIENT_ACKNOWLEDGE,我已经使用spring boot配置了该项目。根据配置,一旦第一个驼峰路由结束,它就应该提交事务并将确认发送给message broker。 但是,这种行为是消息确认只在第二条路由完成后发生。我可以在第一个路由中配置什么来

  • 3.3 PUBLISH – 发布消息 PUBLISH控制报文是指从客户端向服务端或者服务端向客户端传输一个应用消息。 3.3.1 固定报头 图例 3.10 – PUBLISH报文固定报头描述了固定报头的格式 图例 3.10 – PUBLISH报文固定报头 Bit 7 6 5 4 3 2 1 0 byte 1 MQTT控制报文类型 (3) DUP QoS-H QoS- RETAIN 0 0 1 1

  • 有人知道我在哪里可以得到一些示例MQTT客户端Go(golang)代码,它在无限循环中发布和订阅? null 下面是我正在使用的代码: 我翻阅了GoDocs寻找一些关于如何保持连接畅通的提示,但似乎没有什么相关的。我当然可以在subscribe上执行无限循环,但这似乎效率低下。

  • 3.4 PUBACK –发布确认 PUBACK报文是对QoS 1等级的PUBLISH报文的响应。 3.4.1 固定报头 图例 3.12 - PUBACK报文固定报头 Bit 7 6 5 4 3 2 1 0 byte 1 MQTT报文类型 (4) 保留位 0 1 0 0 0 0 0 0 byte 2… 剩余长度 0 0 0 0 0 0 1 0 剩余长度字段 表示可变报头的长度。对PUBACK报文这个

  • 我们尝试使用小型反应式消息传递发布和订阅MQTT协议。我们设法通过以下简单代码将消息实际发布到特定主题/频道 我们想要做的是在我们需要方法时以某种方式调用动态主题,用户将在其中定义它。那是我们的问题,但后来我们在github中从该存储库中找到了这些类。包名称 例如,我们发现有一个类说它对MQTT代理进行了发布调用(Mosquito server up)。 在该语句中