wy471x commented on PR #6902: URL: https://github.com/apache/shenyu/pull/6902#issuecomment-6116633195
Follow-up pushed for the outstanding review point on the will retain flag (Aias00, 2026-10-04), plus a rebase onto current master. - **Retained wills now use the normal retained-store semantics.** `Publish.publishWill` stores the will payload in `TopicRepository` when `willRetain` is set and the payload is non-empty, and clears the stored value for an empty retained will — matching the regular `PUBLISH` retain path, so clients that subscribe later receive the retained will. - **Tests added.** `PublishWillTest.testRetainedWillIsStoredForLaterSubscribers` and `PublishWillTest.testEmptyRetainedWillClearsStoredValue`; both fail when the retained-store block is removed. - **Rebased onto current master (`9350d318`).** Resolved the conflicts introduced by the upstream client-session refactor: CONNECT now stores the will *and* runs the new clean-session / session-present logic; DISCONNECT clears the stored will and then calls the shared `cleanChannel`; `channelInactive` publishes the will once and then delegates cleanup to `Disconnect.cleanChannel`; `MqttFactory` keeps the upstream DISCONNECT dispatch. The branch is mergeable again. Local verification (JDK 21): `./mvnw -o -B -pl shenyu-protocol/shenyu-protocol-mqtt -am test -Dmaven.javadoc.skip=true` -> 129 tests pass, checkstyle (validate) reports 0 violations. -- 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]
