Open artembilan opened 4 years ago
+1
Paho supports v5 already :)
@oxcafedead ,
doesn't look like: https://www.eclipse.org/paho/index.php?page=clients/java/index.php.
Probably they have plans for that support, but no official release yet.
Thanks
@artembilan,
strange, because the initial link brought by you in the issue states v5 support :) https://github.com/eclipse/paho.mqtt.java/blob/master/MQTTv5.md also: https://github.com/eclipse/paho.mqtt.java/releases/tag/v1.2.5
Thank you for the pointer, @oxcafedead !
released this on Jul 14
So, that happened recently.
Anyway I see that we need to build v5-compatible channel adapters to support a new artifact from them.
On the other hand Hive also have different packages (probably with different API) for v3 & v5, respectively.
Although I still tended to move to Hive client since they have Reactor API for us.
Only the problem not clear when I will have time and resources to just into this issue.
Contributions are welcome!
Paho still not fully supports v5 and the latest version dates back to July 2020...
Hi @vivianazimbone !
would you mind to elaborate more what exactly Paho does not support yet for v5 protocol?
Thanks
Hi, shared subscriptions are still not working with the latest paho client. The $share prefix is not handled correctly on incoming messages and the messages are not routed to the internal subscriber by the client implementation.
Also, when the broker goes down, the MQTTv5 client does not reconnect correctly, at least when using the ClientManager for several internal message consumers.
Here is some discussion about $share
: https://stackoverflow.com/questions/75950944/shared-subscription-with-spring-integration-mqttv5-not-receiving-messages.
Not Spring Integration related, though.
Not sure what is your problem with reconnecting, but here is a test we check that behavior with: https://github.com/spring-projects/spring-integration/blob/main/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/Mqttv5BackToBackAutomaticReconnectTests.java.
More over this does not sound like related to the HiveMQ issue we are talking here about...
Please, consider to raise a separate issue about your ClientManager
problem and share some code to let us reproduce and confirm the issue and possible fix in the end.
It seems to me the Paho project is somewhat dead, or at least the Java client side of it. There has been zero activity for 2 years in its Git repository, except for a single commit recently related to some Eclipse bureaucracy. Replacing Paho with anything else in Spring Integration will require quite a lot of changes as the MQTT support in Spring Integration relies on it heavily. My project can live with Paho in Spring Integration for now but it does not seem to be a viable client in the long term.
Yes, we are OK to migrate to Hive MQTT client, but we don't have resources right now to look into that. The contribution is welcome: https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc
This client support both MQTT v3.1.1 and v5 protocol and it is Java 8 and Reactive ready: https://github.com/hivemq/hivemq-mqtt-client
Unlike Paho which is not clear when will support v5: https://github.com/eclipse/paho.mqtt.java/blob/master/MQTTv5.md
Although I might agree that this could be something for version 6.0 or we can support both clients since 5.3...