wy471x opened a new pull request, #6922:
URL: https://github.com/apache/shenyu/pull/6922

   Only store the message in TopicRepository when the RETAIN flag is set, and 
remove the retained message when a zero-byte retained PUBLISH is received 
(MQTT-3.3.1).
   
   <!-- Describe your PR here; e.g. Fixes #issueNo -->
   
   <!--
   Thank you for proposing a pull request. This template will guide you through 
the essential steps necessary for a pull request.
   -->
   Make sure that:
   
   - [X] You have read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [X] You submit test cases (unit or integration tests) that back your 
changes.
   - [X] Your local test passed `./mvnw clean install 
-Dmaven.javadoc.skip=true`.
   
   ## Summary
   Changes:
   - Publish.java: publish() now checks msg.fixedHeader().isRetain(). Retained 
messages with payload are stored via TopicRepository.add; a zero-byte retained 
PUBLISH calls           
     TopicRepository.remove(topic) to delete the retained message; non-retained 
messages no longer touch the store (MQTT-3.3.1 compliance). Subscriber fan-out 
is unchanged.
   
   Test Cases:
   - PublishTest.java (new): 3 tests covering retained storage, non-retained 
no-op, and zero-byte deletion.
   
   close [#6849](https://github.com/apache/shenyu/issues/6849)


-- 
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]

Reply via email to