Configuration Reference

All connector options are set as Reactive Messaging channel attributes, using the following key format:

mp.messaging.[incoming|outgoing].<channel-name>.<attribute>=<value>

For example, to set the QoS of the outgoing channel topic-price:

mp.messaging.outgoing.topic-price.connector=smallrye-mqtt-hivemq
mp.messaging.outgoing.topic-price.qos=1

The connector attribute must always be set to smallrye-mqtt-hivemq. Only host is mandatory (and it can be provided automatically by Dev Services in dev/test mode).

The tables below group the attributes by purpose. For the raw, complete list see Full attribute list. Security options are explained in depth in Security & TLS, and health-check options in Health Checks.

Connection

Attribute Description Type Default

host

MQTT server host name or IP. Mandatory.

string

port

MQTT server port.

int

1883, or 8883 when ssl/trust-all is enabled

server-name

SNI (Server Name Indication) server name.

string

client-id

MQTT client identifier.

string

auto-generated-client-id

Generate a random clientId when none is provided.

boolean

true

connect-timeout-seconds

Connection timeout, in seconds.

int

60

Authentication & TLS

See Security & TLS for complete, worked examples.

Attribute Description Type Default

username

Username for MQTT simple authentication.

string

password

Password for MQTT simple authentication.

string

ssl

Enable SSL/TLS.

boolean

false

trust-all

Trust every server certificate. Insecure — development only.

boolean

false

ssl.truststore.type

Truststore type (jks, pkcs12).

string

jks

ssl.truststore.location

Truststore location (required when ssl=true).

string

ssl.truststore.password

Truststore password (required when ssl=true).

string

ssl.keystore.type

Keystore type (jks or pkcs12). Enables mutual TLS.

string

jks

ssl.keystore.location

Keystore location. Enables mutual TLS.

string

ssl.keystore.password

Keystore password (also used as the private-key password).

string

ssl.hostVerifier

Verify that the server certificate matches the hostname. Set to false to disable. Insecure — development only.

boolean

true

Session & keep-alive

Attribute Description Type Default

auto-clean-session

Start with a clean MQTT session.

boolean

true

keep-alive-seconds

Keep-alive timeout, in seconds.

int

30

auto-keep-alive

Let the client answer PINGREQ automatically.

boolean

true

Messaging & QoS

Attribute Description Type Default

topic

Topic to subscribe/publish to. Defaults to the channel name.

string

qos

QoS level (0, 1 or 2).

int

0

max-message-size

Maximum MQTT message size, in bytes.

int

8092

max-inflight-queue

Maximum number of unacknowledged messages in flight.

int

10

broadcast

(incoming only) Dispatch each received message to all subscribers.

boolean

false

failure-strategy

(incoming only) Behaviour when a message is nacked: fail or ignore.

string

fail

merge

(outgoing only) Allow the channel to have multiple upstreams.

boolean

false

Last will

The Last Will and Testament is published by the broker if the client disconnects unexpectedly.

Attribute Description Type Default

will-flag

Send will information on connection.

boolean

false

will-retain

Retain the will message on the broker.

boolean

false

will-qos

QoS level of the will message.

int

0

Reconnection

The underlying HiveMQ client always reconnects automatically. These options tune the retry behaviour.

Attribute Description Type Default

reconnect-attempts

Maximum number of reconnect attempts.

int

5

reconnect-interval-seconds

Interval between reconnect attempts, in seconds.

int

1

Health checks

See Health Checks for details.

Attribute Description Type Default

check-topic-enabled

Enable the readiness/liveness health check.

boolean

false

check-topic-name

Topic used by the health check.

string

$SYS/broker/uptime

readiness-timeout

Time (ms) without a message before the client is not ready.

int

20000

liveness-timeout

Time (ms) without a message before the client is not alive.

int

120000

Dev Services (build time)

Dev Services are configured with quarkus.hivemq.devservices.* build-time properties — see Dev Services.

Full attribute list

The following tables are generated from the connector’s @ConnectorAttribute definitions and list every option, per direction.

Table 1. Incoming (source) attributes of the smallrye-mqtt-hivemq connector
Attribute Description Type Default

host

MQTT server host name/IP. Mandatory.

string

port

MQTT server port.

int

8883 (ssl) / 1883

server-name

SNI server name.

string

client-id

Client identifier.

string

auto-generated-client-id

Generate the clientId automatically.

boolean

true

username

Username used to connect to the broker.

string

password

Password used to connect to the broker.

string

ssl

Enable SSL/TLS.

boolean

false

trust-all

Trust every server certificate (insecure).

boolean

false

ssl.truststore.type

Truststore type (jks, pkcs12).

string

jks

ssl.truststore.location

Truststore location.

string

ssl.truststore.password

Truststore password.

string

ssl.keystore.type

Keystore type (jks, pkcs12) — used for mTLS.

string

jks

ssl.keystore.location

Keystore location — used for mTLS.

string

ssl.keystore.password

Keystore password — used for mTLS.

string

ssl.hostVerifier

Enable SSL hostname verification. Set to false to disable (insecure).

boolean

true

auto-clean-session

Start with a clean session.

boolean

true

keep-alive-seconds

Keep-alive timeout, in seconds.

int

30

auto-keep-alive

Let the client handle PINGREQ automatically.

boolean

true

connect-timeout-seconds

Connect timeout, in seconds.

int

60

topic

MQTT topic to subscribe to. If not set, the channel name is used.

string

qos

QoS level used when subscribing.

int

0

max-message-size

Max MQTT message size, in bytes.

int

8092

max-inflight-queue

Max count of unacknowledged messages.

int

10

broadcast

Dispatch the received messages to multiple consumers.

boolean

false

failure-strategy

Strategy applied when a message is nacked: fail or ignore.

string

fail

will-flag

Provide will information on connection.

boolean

false

will-retain

Retain the will message.

boolean

false

will-qos

QoS level of the will message.

int

0

reconnect-attempts

Max reconnect attempts.

int

5

reconnect-interval-seconds

Reconnect interval, in seconds.

int

1

check-topic-enabled

Enable the liveness/readiness health check.

boolean

false

check-topic-name

Topic used for the health check.

string

$SYS/broker/uptime

readiness-timeout

Timeout (ms) before the client is declared not ready.

int

20000

liveness-timeout

Timeout (ms) before the client is declared not alive.

int

120000

Table 2. Outgoing (sink) attributes of the smallrye-mqtt-hivemq connector
Attribute Description Type Default

host

MQTT server host name/IP. Mandatory.

string

port

MQTT server port.

int

8883 (ssl) / 1883

server-name

SNI server name.

string

client-id

Client identifier.

string

auto-generated-client-id

Generate the clientId automatically.

boolean

true

username

Username used to connect to the broker.

string

password

Password used to connect to the broker.

string

ssl

Enable SSL/TLS.

boolean

false

trust-all

Trust every server certificate (insecure).

boolean

false

ssl.truststore.type

Truststore type (jks, pkcs12).

string

jks

ssl.truststore.location

Truststore location.

string

ssl.truststore.password

Truststore password.

string

ssl.keystore.type

Keystore type (jks, pkcs12) — used for mTLS.

string

jks

ssl.keystore.location

Keystore location — used for mTLS.

string

ssl.keystore.password

Keystore password — used for mTLS.

string

ssl.hostVerifier

Enable SSL hostname verification. Set to false to disable (insecure).

boolean

true

auto-clean-session

Start with a clean session.

boolean

true

keep-alive-seconds

Keep-alive timeout, in seconds.

int

30

auto-keep-alive

Let the client handle PINGREQ automatically.

boolean

true

connect-timeout-seconds

Connect timeout, in seconds.

int

60

topic

MQTT topic to publish to. If not set, the channel name is used.

string

qos

QoS level used when publishing.

int

0

max-message-size

Max MQTT message size, in bytes.

int

8092

max-inflight-queue

Max count of unacknowledged messages.

int

10

merge

Allow multiple upstreams for the channel.

boolean

false

will-flag

Provide will information on connection.

boolean

false

will-retain

Retain the will message.

boolean

false

will-qos

QoS level of the will message.

int

0

reconnect-attempts

Max reconnect attempts.

int

5

reconnect-interval-seconds

Reconnect interval, in seconds.

int

1

check-topic-enabled

Enable the liveness/readiness health check.

boolean

false

check-topic-name

Topic used for the health check.

string

$SYS/broker/uptime

readiness-timeout

Timeout (ms) before the client is declared not ready.

int

20000

liveness-timeout

Timeout (ms) before the client is declared not alive.

int

120000