-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add MQTT5 sample application with integration flows and tests #365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Minyoung Noh <[email protected]> spring-projects#323
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for creating a new PR for this sample. It is much appreciated.
Currently the test fails because you are mixing Junit4 and Junit5. In the comments below we have made recommendations on how to handle this properly.
@@ -0,0 +1,24 @@ | |||
<configuration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using the logback configuration here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cppwfs Is it better to delete the logback configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be removed unless there is a particular reason it is needed.
* @since 5.2 | ||
* | ||
*/ | ||
public class BrokerRunning extends TestWatcher { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove BrokerRunning as the method for testing the MQTT5 app. Please use the Mosquitto test container as shown here: https://github.com/spring-projects/spring-integration/blob/main/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/MqttDslTests.java
@Bean | ||
public MqttConnectionOptions mqttConnectionOptions() { | ||
MqttConnectionOptions options = new MqttConnectionOptions(); | ||
options.setServerURIs(new String[]{ "tcp://localhost:1883" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need expose host and port with either ConfigurationProperties or SystemProperties instead of the hardcoded value. Especially when using test container because they use dynamic properties to establish ports.
Signed-off-by: nmy6452 <[email protected]>
Signed-off-by: nmy6452 <[email protected]>
Signed-off-by: nmy6452 <[email protected]>
Signed-off-by: Minyoung Noh [email protected]
Create PR for #323 issues.
I worked on the PR base that was rejected before, please refer to it and review it. #364