hivemq-mqtt-client icon indicating copy to clipboard operation
hivemq-mqtt-client copied to clipboard

QOS 1 together with retained messages can lead to looping reconnect cycle (MQTT 5.0)

Open joggeli34 opened this issue 2 years ago • 0 comments

🐛 Bug Report

The client closes the connection if a resend message is received during the same connection, which is fine. But when this message is a retained message, following will happen (together with emqx):

  1. Retained message is received
  2. A same message is received as duplicate as it must be resent when it wasn't acknowledged in the former connection.
  3. The connection is closed, same starts again

🔬 How To Reproduce

Steps to reproduce the behavior:

  1. Use QoS 1 with retained messages
  2. Close the connection before ack

Environment

What version of this client are you using?

1.3.2

JVM version?

17

Which MQTT protocol version is being used?

MQTT 5.0

Which MQTT broker (name and version)?

Emqx 5.1.6

📈 Expected behavior

Duplicates of retained messages should be ignored at least once

joggeli34 avatar Sep 06 '23 09:09 joggeli34