MQTT-Explorer
MQTT-Explorer copied to clipboard
MQTT - expose clean session option
Using linux appimage , there is not an option for clean session, instead its always true, the appimage is great but controlling the session flag is very important, any idea?
Please elaborate in greater detail what are you are trying to achieve.
@thomasnordquist the appimage dsoe not have an option for clean session of login/subscribe , after tracing my connection to the server, i found out the appimage sets it automatically to true, what am saying having an option to control the session flag would be great add to the appimage.
@thomasnordquist am using version 0.3.5, i noticed there is 0.3.6 on the pre-release dose the new 1 have the option for session?
Okay I get your point. (The session flag is not affiliated in any way with AppImage)
The current behavior is that MQTT-Explorer resubscribes to all topics after a reconnect, but the server does not store a queue of not-yet transmitted messages.
Can you describe the problem you want to solve?
i think it dsoe set the cs:1, however here is the trace log;
New session with PID <8963.907.0> found for client "mqtt-explorer-7564280a"
<8963.907.0> MQTT RECV: CID: "mqtt-explorer-7564280a" CONNECT(c: mqtt-explorer-7564280a, v: 4, u: username, p: password, cs: 1, ka: 60)
sure, the mentioned above client1 is offline now, right? then client3 send a message to client1 on topic/dummy with retain flag, now client1, login the server, subs to topic/# but dose not see the message. expected behaviour, is that once client 1 should recieve the message sent by client3, the only thing i can think of is clean session flag, and i have provided the logs as prove, going to try another client to amek sure now.
with another client it works as expected, now with appimge its only with websockets set to true, with tcpp its set to false.
Just wanted to add my voice to this, and maybe mention the use case. We have a number of IoT devices publishing data to a broker, all with QoS=1. Currently when I connect to the broker with MQTT Explorer, I am only able to see newly published messages - i.e. anything that comes in after I connected.
In addition, upon connection I would also like to receive messages that were published "while I was out". According to my understanding of the MQTT spec, this should be achievable if my client sets the "clean session" flag to 0 upon each connection. Therefore it would be great to be able to set that, rather than always connect with clean session=1.
My main workaround currently is to keep MQTT Explorer connected and subscribed continuously, so that at any given point I can see the last data. Though it would be nice to not have to do that.
Either way, thanks for a great tool!
Is this planned? This would be required for a case like this one: https://www.hivemq.com/blog/mqtt-essentials-part-7-persistent-session-queuing-messages/
There needs to be the possibility to specify.
- The client id
- clean session
When the clean session is set to false, the broker keeps all the unread messages for the set client, and if MQTT explorer re-connects with randomized clients id, it will still not see the missed messages, furthermore, these messages would remain on the broker perpetually causing broker issues over time (running out of memory)
The two options go hand in hand, if you want to use the clean session = false, you should be reconnecting with the same client id.
It would be great if these two flags are added this is great app.