Skip to content

fix(mqtt): raise QoS1 retransmit timeout to stop duplicate /status storms#23

Merged
agessaman merged 1 commit into
mqtt-bridge-implementation-flexfrom
fix/mqtt-status-retransmit-storm
Jul 10, 2026
Merged

fix(mqtt): raise QoS1 retransmit timeout to stop duplicate /status storms#23
agessaman merged 1 commit into
mqtt-bridge-implementation-flexfrom
fix/mqtt-status-retransmit-storm

Conversation

@agessaman

Copy link
Copy Markdown
Owner

esp-mqtt's default message_retransmit_timeout is 1000 ms: any unacked QoS 1 PUBLISH is resent (byte-identical, DUP=1) every second until the PUBACK arrives or the outbox entry expires (30 s). Status messages are the only QoS 1 publishes; on a congested or recovering uplink where broker acks take several seconds, each 5-minute /status was delivered ~6 times, ~1 s apart, as exact copies (same timestamp and stats). Downstream observers flagged excessive_packet_copies and at least one broker treats it as abuse.

Expose message_retransmit_timeout via PsychicMqttClient and set it to 15 s in optimizeMqttClientConfig: one retry still fits inside the 30 s outbox expiry, preserving at-least-once delivery while capping duplicates at one.

/packets paths are QoS 0 and were never affected.

…orms

esp-mqtt's default message_retransmit_timeout is 1000 ms: any unacked QoS 1
PUBLISH is resent (byte-identical, DUP=1) every second until the PUBACK
arrives or the outbox entry expires (30 s). Status messages are the only
QoS 1 publishes; on a congested or recovering uplink where broker acks take
several seconds, each 5-minute /status was delivered ~6 times, ~1 s apart,
as exact copies (same timestamp and stats). Downstream observers flagged
excessive_packet_copies and at least one broker treats it as abuse.

Expose message_retransmit_timeout via PsychicMqttClient and set it to 15 s
in optimizeMqttClientConfig: one retry still fits inside the 30 s outbox
expiry, preserving at-least-once delivery while capping duplicates at one.

/packets paths are QoS 0 and were never affected.
@agessaman
agessaman merged commit a9eba67 into mqtt-bridge-implementation-flex Jul 10, 2026
1 check passed
@agessaman
agessaman deleted the fix/mqtt-status-retransmit-storm branch July 10, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant