fanliang11 / surging

Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming ,The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service governance to ensure reliable RPC communication, the engine contains Diagnostic, link tracking for protocol and middleware calls, and integration SkyWalking Distributed APM
MIT License
3.24k stars 924 forks source link

Mqtt protocol preview version has been released #202

Open fanliang11 opened 5 years ago

fanliang11 commented 5 years ago

MQTT需要实现以下功能

  1. 发布订阅功能 2.遗嘱通知 3.支持session功能 4.发布Retain Message 5.qos0、 qos1、qos2消息确认机制 6.支持通过网关publish message 7.支持通过DeviceId哈希负载 8.支持基于topic的broker 节点集群

开发已经完毕,现在需要测试以上功能是否满足需求。也可以下载预览版进行测试,测试方式如下

通过网关根据topic和deviceId发布消息,如下图所示

l _nqxp9c hxvb kwgv g

根据topic和deviceId设备test2会接收到消息

imj7d3w8c5u9g uwm_mtg3b

通过网关根据topic发布消息,如下图所示

n9ihcuy hor7v3 p24py92a

根据topic设备test、test1、 test2会接收到消息

mcslunfp rnsovpbfnk0ut3

wlhappy01 commented 5 years ago

请问遗嘱通知和发布Retain Message怎么使用,使用postman测试 {"deviceId":"",

"message":{ "Topic":"/test1", "Message":"测试", "Qos":0, "WillRetain":true } } 分别4个客户端订阅Topic “/test1”,关闭其中一个客户端,发布信息后,再连接关闭的客户端(订阅的主题是test1),并未收到消息

不太明白遗嘱通知和发布Retain Message,能够示例用法,楼主辛苦,万分感谢~!