Mosquitto: 2.0.x Persistent Client Subscription info lost after mosquitto restart [message #1861183] |
Tue, 26 September 2023 16:58 |
Pavan Kumar Ogirala Messages: 7 Registered: September 2023 |
Junior Member |
|
|
Dear Team,
This is my first post in the forum.
I am upgrading mosquitto in one of my projects from 1.6.12-4 to 2.0.1x series and was struck with one of the strange issues as described below.
Setup Details:
I have a client ABCD acting as a publisher of Topic A.
Configuration Clean Session as True,
Messages sent with QOS 1 )
I have a client PQRS acting as a subscriber of Topic A.
Clean Session False,
QOS1
Behavior with 1.6.12-4
1) When PQRS( which is acting as subscriber) disconnects, mosquito stores all the messages that are sent by client ABCD (which is acting as publisher) in the mosquitto.db as subscriber to the message is not yet finished reading the message.
2) With PQRS in disconnection state if the broker is restarted the subscription information of client PQRS is found to be still remembered as the new messages from ABCD continued to be accumulated/stored in the mosquitto.db.
Behavior with 2.0.1x
1) same as 1.6.12-4
2) With PQRS in disconnection state if the broker is restarted the subscription information of client PQRS is found to be lost and the new messages from ABCD are found to be acknowledged to client ABCD but are not stored in the mosquitto.db.
Reference:
This behavior is found to be not in line with definition of persistent client
"On connection, a client sets the "clean session" flag, which is sometimes also known as the "clean start" flag. If clean session is set to false, then the connection is treated as durable. This means that when the client disconnects, any subscriptions it has will remain and any subsequent QoS 1 or 2 messages will be stored until it connects again in the future. "
Question
Assuming that there is a behavioral difference between the 1.6.12-4 and 2.0.1x. I request you to please suggest if there is an additional setting that would make it work like before or if it is a known issue in 2.0.1x.
I have attached the mosquitto.conf files with this attachment.
The persistence is enabled in the configuration & persistent client expiry is set as 1 Year which should ideally mean the information should be retained.
Please help me in this regard.
Thanks and Regards,
[Updated on: Wed, 27 September 2023 06:13] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03844 seconds