There is no definitive answer to which HiveMQ client is better for HiveMQ MQTT brokers, as it may depend on your specific use case and preferences. However, here are some factors that you may want to consider:
-
The HiveMQ MQTT Client Library is designed to work seamlessly with the HiveMQ MQTT brokers and supports both MQTT 5 and MQTT 3.1.1 protocols. It also offers three different API flavours: reactive, async and blocking, which may suit different programming styles and needs.
-
The Eclipse Paho Java Client is a widely used and well-established MQTT client library that supports both MQTT 5 and MQTT 3.1.1 protocols as well. It has a large user base and community support, and is compatible with many MQTT brokers, including HiveMQ. However, it only offers an async API flavor, which may not be ideal for some scenarios.
-
Both HiveMQ and Paho clients are open source and have Apache License version 2.0. They are also both written in Java and can be easily integrated with Gradle or Maven projects.
In summary, both HiveMQ and Paho clients are viable options for connecting to HiveMQ MQTT brokers, and you may want to try them out and see which one fits your needs better. I hope this helps you make an informed decision.