bytebeamio / rumqtt

The MQTT ecosystem in rust
Apache License 2.0
1.53k stars 234 forks source link

Unexpected PUBACK Packet Sent to Reconnected Broker #849

Closed wangwen-4220 closed 1 month ago

wangwen-4220 commented 2 months ago

Expected Behavior

The client should not send queued PUBACK packets to the broker upon reconnection.

Current Behavior

An isolated PUBACK packet is being sent to the broker after the client reconnects.

Failure Information (for bugs)

Context

During testing with two clients (one publisher and one subscriber with manual ACK), we observed that terminating and restarting the mosquitto broker multiple times resulted in an unexpected PUBACK packet being sent upon reconnection.

1.Run the mosquitto broker. 2.Capture ethernet packets to observe the issue. 3.Set up two clients: one as a publisher and the other as a subscriber with manual ACK. 4.Terminate the broker using Ctrl+C and restart it several times.

Failure Logs

image
wangwen-4220 commented 1 month ago

Try to fix this issue by creating a PR: https://github.com/bytebeamio/rumqtt/pull/859