Quarkus HiveMQ Client
This extension lets you use the HiveMQ MQTT Client inside a Quarkus application, in both JVM and native mode.
Together with the SmallRye Reactive Messaging MQTT extension it contributes a new connector, smallrye-mqtt-hivemq, that uses the HiveMQ Client under the hood instead of the default Vert.x MQTT client. You interact with it through the standard MicroProfile Reactive Messaging API (@Incoming / @Outgoing), so switching connector requires no code changes.
Why use it
Compared to the stock SmallRye MQTT connector, this extension adds:
-
A battle-tested MQTT client that does not depend on the Vert.x MQTT client
-
TLS, mutual TLS and custom CA / self-signed certificate support
-
Backpressure integrated with MQTT QoS
-
Native mode support
-
Dev Services — a broker is started automatically for dev and test
-
Automatic, configurable reconnection and message redelivery
-
A real health check against a configurable topic (defaults to
$SYS/broker/uptime), wired into the Quarkus SmallRye Health report -
Everything else offered by the underlying client — see the HiveMQ MQTT Client documentation
How it works
@Outgoing / @Incoming ─▶ SmallRye Reactive Messaging ─▶ smallrye-mqtt-hivemq connector ─▶ HiveMQ MQTT Client ─▶ MQTT broker
You declare channels in application.properties, bind them to the smallrye-mqtt-hivemq connector, and produce or consume messages with plain Reactive Messaging beans. The connector supports MQTT 3.1.1.
What’s next
-
Installation — add the extension to your project
-
Usage — produce and consume messages
-
Security & TLS — authentication, TLS and mutual TLS
-
Configuration Reference — every connector option