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

Consider to move MQTT support to HiveMQ MQTT Client #3102

Open
artembilan opened this issue Nov 4, 2019 · 11 comments
Open

Consider to move MQTT support to HiveMQ MQTT Client #3102

artembilan opened this issue Nov 4, 2019 · 11 comments

Comments

@artembilan
Copy link
Member

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

@smaugs
Copy link

smaugs commented Oct 7, 2020

+1

@oxcafedead
Copy link
Contributor

Paho supports v5 already :)

@artembilan
Copy link
Member Author

@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

@oxcafedead
Copy link
Contributor

oxcafedead commented Oct 8, 2020

@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

@artembilan
Copy link
Member Author

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!

@vivianazimbone
Copy link

Paho still not fully supports v5 and the latest version dates back to July 2020...

@artembilan
Copy link
Member Author

Hi @vivianazimbone !

would you mind to elaborate more what exactly Paho does not support yet for v5 protocol?

Thanks

@albert-hoffmann
Copy link

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.

@artembilan
Copy link
Member Author

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.

@wilx
Copy link
Contributor

wilx commented Mar 5, 2024

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.

@artembilan
Copy link
Member Author

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

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

6 participants