wy471x commented on PR #6902: URL: https://github.com/apache/shenyu/pull/6902#issuecomment-5942889429
Thanks for the detailed re-check, @sunnysabor — the QoS-capping issue is fixed in 71fb63a. - `SubscribeRepository#getChannelsByTopic` now returns `Map<Channel, MqttQoS>` instead of `List<Channel>`, keeping the maximum granted QoS per channel merged across exact, wildcard and overlapping filters. The one-delivery-per-client dedupe is preserved: overlapping filters now merge through `maxQoS` instead of being collapsed into a `Set`. - `Publish#publishWill` mirrors the normal `Publish#send` path for every matched subscriber: the delivery QoS is `minQoS(willQos, grantedQos)`, and the packet id is derived from the capped QoS (0 for QoS 0, non-zero random otherwise). A QoS 2 will is now delivered to a QoS 0 subscriber at QoS 0 with packet id 0. - Regression test added: `PublishWillTest#testPublishWillCapsQosAtSubscriberGrantedQos` publishes a QoS 2 will to a QoS 0 and a QoS 2 subscriber in the same call and asserts both the per-subscriber QoS and the packet id. The existing will tests were updated to the new `Map` return type, and `SubscribeRepositoryTest` covers the merged-QoS lookup. Verified locally with `./mvnw -B -ntp -pl shenyu-protocol/shenyu-protocol-mqtt -Dcheckstyle.skip=false test`: 104 tests, 0 failures, Checkstyle clean. The branch is also rebased onto the latest master and GitHub now reports it as mergeable, so the earlier conflict block is cleared. One heads-up: `getChannelsByTopic` is now `Map<Channel, MqttQoS>`, which matches the shape #6913 rewrites `SubscribeRepository` to, while #6906 still returns `List<Channel>` — whichever lands first, the other will need a small rebase. Could you take another look when you have a moment? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
