You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2026/10/07 20:08:00 UTC
[jira] [Created] (ARTEMIS-6293) MQTT packet ID state can leak
Justin Bertram created ARTEMIS-6293:
---------------------------------------
Summary: MQTT packet ID state can leak
Key: ARTEMIS-6293
URL: https://issues.apache.org/jira/browse/ARTEMIS-6293
Project: Artemis
Issue Type: Bug
Reporter: Justin Bertram
Assignee: Justin Bertram
For QoS 1 and QoS 2 the broker tracks each in-flight delivery to a client so that a redelivery after a reconnect or a restart reuses the packet ID the client was originally given.
h3. Leak on unsubscribe
When a client unsubscribes while a QoS 1 or QoS 2 delivery is still unacknowledged, the subscription and its queue are deleted along with the message(s), but the corresponding delivery tracking and packet ID state survives. It is only discarded when the session is reset by a clean start or by session expiry.
h3. Duplicate delivery when a subscription is replaced
Also, if a client re-subscribes to a filter it already holds and changes the no-local option, the broker returns in-flight messages to the queue for redelivery. However, the leaked tracking makes the broker treat that redelivery as a new message, so the client receives it again under a different packet ID. For QoS 2 this defeats exactly-once delivery.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org