DongyuanPan commented on code in PR #95:
URL: https://github.com/apache/rocketmq-mqtt/pull/95#discussion_r871187040
##########
mqtt-cs/src/main/java/org/apache/rocketmq/mqtt/cs/session/loop/SessionLoopImpl.java:
##########
@@ -287,6 +288,18 @@ private void addSubscriptionAndInit(Session session,
Set<Subscription> subscript
}
}
+ @Override
+ public void addWillMessage(String channelId, WillMessage willMessage) {
+ Session session = getSession(channelId);
+ if (session == null) {
+ return;
+ }
+ if (willMessage == null) {
+ return;
+ }
+ session.setWillMessage(willMessage);
Review Comment:
Will message lose when the mqtt server down.
FYI,
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718028
in 3.1.2.5
"In the case of a Server shutdown or failure the server MAY defer
publication of Will Messages until a subsequent restart. If this happens there
might be a delay between the time the server experienced failure and a Will
Message being published."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]