Skip to content

Commit

Permalink
Fix for setting max queue size
Browse files Browse the repository at this point in the history
  • Loading branch information
imbeacon committed Oct 14, 2024
1 parent a32e4dd commit 034d2a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tb_device_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,10 @@ def max_inflight_messages_set(self, inflight):
def max_queued_messages_set(self, queue_size):
"""Set the maximum number of outgoing messages with QoS>0 that can be pending in the outgoing message queue.
Defaults to 0. 0 means unlimited. When the queue is full, any further outgoing messages would be dropped."""
self._client.max_queued_messages_set(queue_size)
if queue_size < 0:
raise ValueError("Invalid queue size.")

self._client._max_queued_messages = queue_size

def reconnect_delay_set(self, min_delay=1, max_delay=120):
"""The client will automatically retry connection. Between each attempt it will wait a number of seconds
Expand Down

0 comments on commit 034d2a5

Please sign in to comment.