You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/04 02:53:40 UTC

[I] [BUG] Subscriber fan-out always QoS 0 and reuses publisher's packetId for every subscriber [shenyu]

Aias00 opened a new issue, #6850:
URL: https://github.com/apache/shenyu/issues/6850

   ## Description
   `SubscribeRepository.add(Channel, List<MqttTopicSubscription>)` stores only `channel`, throwing away `s.qualityOfService()`. `Publish.send` hard-codes `MqttQoS.AT_MOST_ONCE` for fan-out and uses `new MqttPublishVariableHeader(topic, packetId)` reusing the inbound publisher's `packetId` for every downstream subscriber.
   
   ## Location
   - `shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/Publish.java:120-121`
   - `shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/repositories/SubscribeRepository.java:56-62`
   
   ## Impact
   QoS 1/2 subscribers receive at-most-once delivery (no redelivery, no ack correlation). Reusing the publisher's packet ID across distinct subscriber channels corrupts each subscriber's in-flight window/ack correlation. Violates MQTT-3.6.
   
   ## Suggested fix
   Store per-subscriber QoS in `SubscribeRepository`; allocate a per-subscriber packetId from each subscriber channel's own id space; deliver at the granted QoS.
   
   ## Related existing
   Distinct from MQTT-03 (#6743, broker→publisher PUBREC direction) and MQTT-04 (#6744, ByteBuf leak) — this is the broker→subscriber fan-out direction.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] Subscriber fan-out always QoS 0 and reuses publisher's packetId for every subscriber [shenyu]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6850:
URL: https://github.com/apache/shenyu/issues/6850#issuecomment-5174058348

   👋 Hello @Aias00
   
   A new issue has been opened by @Aias00:
   - **Title**: [BUG] Subscriber fan-out always QoS 0 and reuses publisher's packetId for every subscriber
   - **Link**: https://github.com/apache/shenyu/issues/6850
   
   Please review when you have time. Thank you! 🙏


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] Subscriber fan-out always QoS 0 and reuses publisher's packetId for every subscriber [shenyu]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6850: [BUG] Subscriber fan-out always QoS 0 and reuses publisher's packetId for every subscriber
URL: https://github.com/apache/shenyu/issues/6850


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] Subscriber fan-out always QoS 0 and reuses publisher's packetId for every subscriber [shenyu]

Posted by "wy471x (via GitHub)" <gi...@apache.org>.
wy471x commented on issue #6850:
URL: https://github.com/apache/shenyu/issues/6850#issuecomment-5243091779

   /assign


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org