emqx/MQTTX

[Help] Topics Restored by Clean Session

Open

#549 opened on Apr 20, 2021

View on GitHub
 (2 comments) (0 reactions) (1 assignee)TypeScript (544 forks)auto 404
help wanted

Repository metrics

Stars
 (5,003 stars)
PR merge metrics
 (PR metrics pending)

Description

Can Topics subscribed in the last session got restored in a new session?

Hi there, I am wondering if topics subscribed in the last session can be restored in a new session? The two sessions will use the same clientID to connect to the broker. And these two sessions get their clean-session set to be 0.

From what I have tested, I found there is no way to restore a topic like that. I did the following:

First, I created a new connection, namely connection 1. In this connection, I used clientID client1 to connect to the broker. Then, I subscribed to a topic, namely topic1. Next, I disconnected connection 1 before creating another connection named connection 2. In connection 2, I used the same clientID client1 as before. But I saw no topic1show up in the subscription list.

Would you mind dig into this? Is there something I did wrong, or we do not currently support this feature? The broker I chose is EMQX and nanoMQ (currently underdeveloping).

Thank you.

Contributor guide