Skip to content
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

Update Paho MQTT client library dependency version to 1.2.3+ because of the keep-alive bug #3348

Closed
ikarsokolov opened this issue Jul 17, 2020 · 4 comments

Comments

@ikarsokolov
Copy link

Current Behavior
org.eclipse.paho:org.eclipse.paho.client.mqttv3 dependency versions is 1.2.2.

Context
Paho MQTT client version 1.2.2 has nasty bug that can result in ping packet being sent to server every millisecond regardless of the configuration. eclipse/paho.mqtt.java#738

Version 1.2.4 seems to work fine.

@ikarsokolov ikarsokolov added status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement labels Jul 17, 2020
@artembilan
Copy link
Member

Sure! Feel free to raise a Pull Request on the matter: https://github.com/spring-projects/spring-integration/blob/master/CONTRIBUTING.adoc.

Be sure that you have an MQTT broker locally on 1883 port to run all our test with your fix.

Thank you!

@artembilan artembilan added in: mqtt and removed status: waiting-for-triage The issue need to be evaluated and its future decided labels Jul 17, 2020
@artembilan artembilan added this to the 5.4 M2 milestone Jul 17, 2020
@artembilan artembilan added backport 5.1.x ideal-for-user-contribution An issue that would ideal for a user to get started with contributing. labels Jul 17, 2020
@ikarsokolov
Copy link
Author

I can't make unit tests pass on master branch. BackToBackAdapterTests.testAddRemoveTopic() fails with mosquitto 1.6.9 as local broker.

ERROR [main] [org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter] - Error connecting or subscribing to []
org.eclipse.paho.client.mqttv3.MqttException: Connection lost
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:190) ~[org.eclipse.paho.client.mqttv3-1.2.2.jar:?]
	at java.lang.Thread.run(Thread.java:834) ~[?:?]
Caused by: java.io.EOFException
	at java.io.DataInputStream.readByte(DataInputStream.java:272) ~[?:?]
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92) ~[org.eclipse.paho.client.mqttv3-1.2.2.jar:?]
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:137) ~[org.eclipse.paho.client.mqttv3-1.2.2.jar:?]
	... 1 more

All other test passes. A am not sure where to look for the problem.

@artembilan
Copy link
Member

Let me check it locally with MQTT plugin in RabbitMQ!

@artembilan
Copy link
Member

Works well. So, probably some Mosquitto incompatibility issue.

Pushing the upgrade...

Thanks for your contribution!

@artembilan artembilan removed the ideal-for-user-contribution An issue that would ideal for a user to get started with contributing. label Jul 21, 2020
@artembilan artembilan self-assigned this Jul 21, 2020
artembilan added a commit that referenced this issue Jul 21, 2020
Fixed #3348

**Cherry-pick to 5.3.x, 5.2.x & 5.1.x**

# Conflicts:
#	build.gradle
artembilan added a commit that referenced this issue Jul 21, 2020
Fixed #3348

**Cherry-pick to 5.3.x, 5.2.x & 5.1.x**

# Conflicts:
#	build.gradle
artembilan added a commit that referenced this issue Jul 21, 2020
Fixed #3348

**Cherry-pick to 5.3.x, 5.2.x & 5.1.x**

# Conflicts:
#	build.gradle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants