tocrhz / mqtt-spring-boot-starter

MQTT starter for Spring Boot, easier to use.
Apache License 2.0
93 stars 47 forks source link

关于emq5共享订阅如何使用 #26

Closed Sunjianfeng911 closed 3 months ago

Sunjianfeng911 commented 3 months ago

emq版本5.5.0 使用版本1.3.0 配置文件已配置 enableSharedSubscription: true 订阅注解如下 @MqttSubscribe(value = "$SYS/brokers/{node}/clients/{clientId}/{status}",groups = "cloud",shared =true ) 不生效,是哪里使用错误吗

Sunjianfeng911 commented 3 months ago

image mqttx新建连接订阅该主题,再新建或断开另外一个连接,mqttx和程序都接收到topic消息

Sunjianfeng911 commented 3 months ago

image

已解决,发现占位符方式对应的订阅为+,程序和mqttx不是相同topic