apache / rocketmq-mqtt

Apache rocketmq
https://rocketmq.apache.org/
Apache License 2.0
182 stars 65 forks source link

[ISSUE #116] feat: support client event notification #283

Closed YxAc closed 5 months ago

YxAc commented 5 months ago

Which Issue(s) This PR Fixes

Close #116

Brief Description

Support client online/offline event notification

-1)Based on RMQ LMQ storage -2)When a client comes online or goes offline, the MQTT server will generate an event and asynchronously push the event messages to the specified LMQ

How Did You Test This Change?

UT

DongyuanPan commented 5 months ago

Maybe it would be better designed this way. After an online or offline event occurs, the message is directly encapsulated and sent to the system Topic (System Topic in the MQTT protocol) as an ordinary message. The user's device can subscribe to the system Topic (System Topic in the MQTT protocol) for consumption. Of course, like ordinary topics, such messages can also be consumed through MQ.

YxAc commented 5 months ago

Maybe it would be better designed this way. After an online or offline event occurs, the message is directly encapsulated and sent to the system Topic (System Topic in the MQTT protocol) as an ordinary message. The user's device can subscribe to the system Topic (System Topic in the MQTT protocol) for consumption. Of course, like ordinary topics, such messages can also be consumed through MQ.

done

YxAc commented 5 months ago

Please add some examples of how to consume online and offline events, such as consuming through MQTT SDK and consuming through MQ SDK

done, pls take a look when you are free, thx.