Reference

mqtt

Configuration for enabling the MQTT interface.

  • Default value: n/a
  • Hot reloadable: Yes

Values

TypeDescriptionChoices
objectAn object with a set of explicit properties that can be set.-

Properties

NameDescriptionTypeDefault
hoststring0.0.0.0
portinteger1883
listenstring-
tlsobject-
authorizationobject-
no_auth_userIf no user name is provided when an MQTT client connects, will default this user name in the authentication phase. If specified, this will override, for MQTT clients, any no_auth_user value defined in the main configuration file. Note: that this is not compatible with running the server in operator mode.string-
ack_waitThis is the amount of time after which a QoS 1 message sent to a client is redelivered as a DUPLICATE if the server has not received the PUBACK packet on the original Packet Identifier. will cause the server to use the default value (30 seconds). Note that changes to this option is applied only to new MQTT subscriptions.duration30s
max_ack_pendingThis is the amount of QoS 1 messages the server can send to a subscription without receiving any PUBACK for those messages. The valid range is [0..65535]. The total of subscriptions' max_ack_pending on a given session cannot exceed 65535. Attempting to create a subscription that would bring the total above the limit would result in the server returning 0x80 in the SUBACK for this subscription. Due to how the NATS Server handles the MQTT # wildcard, each subscription ending with # will use 2 times the max_ack_pending value. Note that changes to this option is applied only to new subscriptions.integer100
js_domainIf specified, sets an explicit JetStream domain to be used by MQTT.string-
stream_replicasIf specified, sets an explicit number of stream replicas to be used for MQTT-backed streams.integer-
consumer_inactive_thresholdSet an explicit default inactive threshold for consumers used by MQTT.duration-
Previous
urls