Skip to content

Conversation

mths1
Copy link
Contributor

@mths1 mths1 commented Nov 30, 2022

GH-3955: Mqttv5PahoMessageDrivenChannelAdapter only unsubscribe when cleanStart

Fixes #3955

  • add check to doStop that avoids unsubscribe when cleanStart is false.
  • add testcase

@artembilan
Copy link
Member

Also see Checkstyle errors:

Error: eckstyle] [ERROR] /home/runner/work/spring-integration/spring-integration/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/Mqttv5AdapterTests.java:27:1: 'org.springframework.beans.factory.BeanFactory' should be separated from previous imports. [ImportOrder]
Error: eckstyle] [ERROR] /home/runner/work/spring-integration/spring-integration/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/Mqttv5AdapterTests.java:52:71: ',' is not followed by whitespace. [WhitespaceAfter]
Error: eckstyle] [ERROR] /home/runner/work/spring-integration/spring-integration/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/Mqttv5AdapterTests.java:58:71: ',' is not followed by whitespace. [WhitespaceAfter]
Error: eckstyle] [ERROR] /home/runner/work/spring-integration/spring-integration/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/Mqttv5AdapterTests.java:74:69: ',' is not followed by whitespace. [WhitespaceAfter]

You can verify your change locally using Gradle command: gradlew clean :spring-integration-mqtt:check

…subscribe when cleanStart

Fixes spring-projects#3955

* add check to doStop that avoids unsubscribe when cleanStart is false.
* add testcase
@mths1 mths1 requested a review from artembilan November 30, 2022 22:58
@artembilan artembilan merged commit 4206c41 into spring-projects:main Dec 1, 2022
@artembilan
Copy link
Member

... and back-ported to 5.5.x as 36e4fe1 after fixing conflicts.

@mths1 ,

thank you for contribution; looking forward for more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MQTTv5: Mqttv5PahoMessageDrivenChannelAdapter unsubscribes from topics even when cleanStart/cleanSession is false

2 participants