eclipse-paho / eclipse-paho/paho.mqtt.python

buffer strategy for QOS>0 messages

Open
#856 1 comment 0 reactions 0 assignees View on GitHub
Status: Available Type: Enhancement
Dominant language
Python
Stars
2.4k
Forks
742
Avg merge
12d 48m
Merged PRs (30d)
1

Description

In my application. I am publishing sensor data and need to buffer messages in case connection is temporarily lost.
Thus, I am sending my data with QOS 2.
I limited the number of queued message in case of disconnection via max_queued_messages_set().

Now, If I got it right, here is what happens when the buffer runs full: all newer messages get discarded.
So, with a limit of 5, if I publish 1 2 3 4 5 6 7 8 9 0, after reconnection these messages get delivered: 1 2 3 4 5.

For me, it would be more useful if the buffer would be circularly rewritten, so the newest 5 messages are queued.

Is there a way to set this up?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.