Skip to main content
Version: Mosquitto 2.1

Configuration

Mosquitto Configuration file

Name

mosquitto.conf — the configuration file for mosquitto

Synopsis

mosquitto.conf

Description

mosquitto.conf is the configuration file for mosquitto. This file can reside anywhere as long as mosquitto can read it.

File Format

All lines with a # as the very first character are treated as a comment.

Configuration lines start with a variable name. The variable value is separated from the name by a single space.

Authentication

broker

The authentication options described below allow a wide range of possibilities in conjunction with the listener options. This section aims to clarify the possibilities.

The simplest option is to have no authentication at all. This is the default if no other options are given. Unauthenticated encrypted support is provided by using the certificate based SSL/TLS based options certfile and keyfile.

MQTT provides username/password authentication as part of the protocol. Use the password_file option to define the valid usernames and passwords. Be sure to use network encryption if you are using this option otherwise the username and password will be vulnerable to interception. Use the per_listener_settings to control whether passwords are required globally or on a per-listener basis.

When using certificate based encryption there are three options that affect authentication. The first is require_certificate, which may be set to true or false. If false, the SSL/TLS component of the client will verify the server but there is no requirement for the client to provide anything for the server: authentication is limited to the MQTT built in username/password. If require_certificate is true, the client must provide a valid certificate in order to connect successfully. In this case, the second and third options, use_identity_as_username and use_subject_as_username, become relevant. If set to true, use_identity_as_username causes the Common Name (CN) from the client certificate to be used instead of the MQTT username for access control purposes. The password is not used because it is assumed that only authenticated clients have valid certificates. This means that any CA certificates you include in cafile or capath will be able to issue client certificates that are valid for connecting to your broker. If use_identity_as_username is false, the client must authenticate as normal (if required by password_file) through the MQTT options. The same principle applies for the use_subject_as_username option, but the entire certificate subject is used as the username instead of just the CN.

When using pre-shared-key based encryption through the psk_hint and psk_file options, the client must provide a valid identity and key in order to connect to the broker before any MQTT communication takes place. If use_identity_as_username is true, the PSK identity is used instead of the MQTT username for access control purposes. If use_identity_as_username is false, the client may still authenticate using the MQTT username/password if using the password_file option.

Both certificate and PSK based encryption are configured on a per-listener basis.

Authentication plugins can be created to augment the password_file, acl_file and psk_file options with e.g. SQL based lookups.

It is possible to support multiple authentication schemes at once. A config could be created that had a listener for all of the different encryption options described above and hence a large number of ways of authenticating.

General Options

acl_file file path

Set the path to an access control list file. If defined, the contents of the file are used to control client access to topics on the broker.

If this parameter is defined then only the topics listed will have access. Topic access is added with lines of the format:

topic [read|write|readwrite|deny] \<topic>

The access type is controlled using "read", "write", "readwrite" or "deny". This parameter is optional (unless \<topic> includes a space character) - if not given then the access is read/write. \<topic> can contain the + or # wildcards as in subscriptions. The "deny" option can used to explicitly deny access to a topic that would otherwise be granted by a broader read/write/readwrite statement. Any "deny" topics are handled before topics that grant read/write access.

The first set of topics are applied to anonymous clients, assuming allow_anonymous is true. User specific topic ACLs are added after a user line as follows:

user \<username>

The username referred to here is the same as in password_file. It is not the clientid.

It is also possible to define ACLs based on pattern substitution within the topic. The form is the same as for the topic keyword, but using pattern as the keyword.

pattern [read|write|readwrite|deny] \<topic>

The patterns available for substition are:

  • %c to match the client id of the client
  • %u to match the username of the client

The substitution pattern must be the only text for that level of hierarchy. Pattern ACLs apply to all users even if the "user" keyword has previously been given.

Example:

pattern write sensor/%u/data

Allow access for bridge connection messages:

pattern write $SYS/broker/connection/%c/state

If the first character of a line of the ACL file is a # it is treated as a comment.

If per_listener_settings is true, this option applies to the current listener being configured only. If per_listener_settings is false, this option applies to all listeners.

Reloaded on reload signal. The currently loaded ACLs will be freed and reloaded. Existing subscriptions will be affected after the reload.

allow_anonymous [ true | false ]

Listeners

The listeners open ports on the broker side, to allow clients connecting to the brokers using the port.

The network ports that Mosquitto listens to can be controlled using listeners.

The default listener options can be overridden and further listeners can be created.

Multiple Listeners

You can have different authentication options on different listeners if you use per_listener_settings true. For example:

per_listener_settings true
listener 1883
password_file no-tls.passwd
listener 8883
cafile ca.crt
certfile server.crt
keyfile server.key
password_file tls.passwd

It's not just password_file which can be listener specific, most of the auth/access options are.

General Configuration Information

Configuration Files

A configuration file, often abbreviated as configuration file, defines the parameters, options, settings and preferences to be applied in an IT context.

Proxy Subscription

A proxy is a communication interface in a network. It works as an intermediary, taking requests and then connecting to the other side via its own address.

This serves as a method to simplify or control the complexity of the request, or provide additional benefits such as load balancing, privacy, or security.

Proxies were devised to add structure and encapsulation to distributed systems.

A proxy server thus functions on behalf of the client when requesting service, potentially masking the true origin of the request to the resource server.

Randomness

provided by the SSL library.

Random Numbers are a cryptographic primitive and cornerstone to nearly all cryptographic systems.

They are used in almost all areas of cryptography, from key agreement and transport to session keys for bulk encryption.

A quality source of random bits and proper use of OpenSSL APIs will help ensure your program is cryptographically sound.

On the other hand, a poor source of randomness or incorrect library usage could result in loss of security.

This article will help you use random number generation routines correctly when programming with the OpenSSL library.

OCSP

supported, not tested

With the Online Certificate Status Protocol, an external service is used to store revocation information for individual certificates centrally with a so-called OCSP responder.

The MQTT broker now queries the validity of a specific client certificate from this service.

This allows the information to be managed centrally instead of being rolled out to all MQTT brokers.

Clients

Username

The client username maps to the username provided in the CONNECT packet when a device connects. The username is unique across the plugin, so attempting to create a client with a duplicate username will result in an error. The username acts as the primary key if you want to change anything about the client.

user username

When run as root, change to this user and its primary group on startup. If set to "mosquitto" or left unset, and if the "mosquitto" user does not exist, then mosquitto will change to the "nobody" user instead. If this is set to another value and mosquitto is unable to change to this user and group, it will exit with an error. The user specified must have read/write access to the persistence database if it is to be written. If run as a non-root user, this setting has no effect. Defaults to mosquitto.

This setting has no effect on Windows and so you should run mosquitto as the user you wish it to run as.

Not reloaded on reload signal.

Read more about Username.

Password

The client password maps to the password provided in the CONNECT packet when a device connects. The password may be unset when a client is created, this will mean that devices will be unable to connect as the corresponding client.

The password can be updated at any point, but only by a client with the correct access. Devices typically cannot update their own passwords.

Read more about Password.

Client ID

The client id maps to the client id provided in the CONNECT packet when a device connects. This is an optional attribute.

If the client id is empty or not provided, then any device can connect with the username for this client regardless of its client id. This means that multiple devices could connect with the same credentials at the same time, but sharing credentials between devices is not recommended.

If the client id is set, then a device can only connect as this client if the triple of username, password, and client id all match those in the client.

Read more about Client ID: Here. And here.

Groups

A client can be a member of any number of groups.

Read more about Groups: Here. And here.

Roles

A client can be assigned to any number of roles. A role gives the client access to different topics.

Read more about Roles: Here. And here.

Text name

This is an optional text field to give a human friendly name to this client.

Text description

This is an optional text field to give a human friendly description to this client.

info

Disabled A client can be set to be enabled/disabled at any point. Disabling a client means that any devices currently connected using the credentials for that client will be disconnected and unable to reconnect.(#).

Bridges

Introduction

Multiple brokers can be connected together with the bridging functionality. This is useful where it is desirable to share information between locations, but where not all of the information needs to be shared. An example could be where a number of users are running a broker to help record power usage and for a number of other reasons. The power usage could be shared through bridging all of the user brokers to a common broker, allowing the power usage of all users to be collected and compared. The other information would remain local to each broker.

MQTT Bridge

Whenever information (data) must be transferred, but the clients do not have permission to access another's MQTT broker, bridges are being used.

Each client accesses its own broker, but shared specific information with the other client.

tip

Some Keep in mind: Connect the broker to the client. Make sure to use TLS security whenever possible and eligible.(#).

Certificates and Bridges

Read more about TLS.

In advance the client send you a certificate.

Prior the client set up an ACL on the Mosquitto broker. Ensuring the connectiong broker only can have access to location with data meant for the connecting broker.

Within the ACL the client has set a username and password, in order to authenticate the broker connecting.

These last two lines define which topic branches will be published (out) and which will be subscribed to (in) from the point of view of your broker. There are a lot of things you can tweak in this configuration, but this is should get you started.

Publishes

Both broker you want to bridge must subscribe to each other.

The brokers will then receive the messages published and forward them to the sibscribing clients.

Configuring Bridges

SIGHUP

Upon receiving the SIGHUP signal, mosquitto will attempt to reload configuration file data, assuming that the -c argument was provided when mosquitto was started. Not all configuration parameters can be reloaded without restarting.

SIGUSR1

Upon receiving the SIGUSR1 signal, mosquitto will write the persistence database to disk. This signal is only acted upon if persistence is enabled.

  • persistence [ true | false ]

If true, connection, subscription and message data will be written to the disk in mosquitto.db at the location dictated by persistence_location. When mosquitto is restarted, it will reload the information stored in mosquitto.db. The data will be written to disk when mosquitto closes and also at periodic intervals as defined by autosave_interval. Writing of the persistence database may also be forced by sending mosquitto the SIGUSR1 signal. If false, the data will be stored in memory only. Defaults to false.

The persistence file may change its format in a new version. The broker can currently read all old formats, but will only save in the latest format. It should always be safe to upgrade, but cautious users may wish to take a copy of the persistence file before installing a new version so that they can roll back to an earlier version if necessary.

This option applies globally.

Reloaded on reload signal.

  • persistence_file file name

The filename to use for the persistent database. Defaults to mosquitto.db.

This option applies globally.

Reloaded on reload signal.

  • persistent_client_expiration duration

This option allows persistent clients (those with clean session set to false) to be removed if they do not reconnect within a certain time frame. This is a non-standard option. As far as the MQTT spec is concerned, persistent clients persist forever.

Badly designed clients may set clean session to false whilst using a randomly generated client id. This leads to persistent clients that will never reconnect. This option allows these clients to be removed.

The expiration period should be an integer followed by one of h d w m y for hour, day, week, month and year respectively. For example:

  • persistent_client_expiration 2m
  • persistent_client_expiration 14d
  • persistent_client_expiration 1y

As this is a non-standard option, the default if not set is to never expire persistent clients.

This option applies globally.

Reloaded on reload signal.

  • persistence_location path

The path where the persistence database should be stored. If not given, then the current directory is used.

This option applies globally.

Reloaded on reload signal.

SIGUSR2

The SIGUSR2 signal causes mosquitto to print out the current subscription tree, along with information about where retained messages exist. This is intended as a testing feature only and may be removed at any time.

Multiple bridges (connections to other brokers) can be configured using the following variables.

Bridges cannot currently be reloaded on reload signal.

address address[:port]address[:port]],

addresses address[:port]address[:port]]

Specify the address and optionally the port of the bridge to connect to. This must be given for each bridge connection. If the port is not specified, the default of 1883 is used.

If you use an IPv6 address, then the port is not optional.

Multiple host addresses can be specified on the address config. See the round_robin option for more details on the behaviour of bridges with multiple addresses.

  • bridge_attempt_unsubscribe [ true | false ]

If a bridge has topics that have "out" direction, the default behaviour is to send an unsubscribe request to the remote broker on that topic. This means that changing a topic direction from "in" to "out" will not keep receiving incoming messages. Sending these unsubscribe requests is not always desirable, setting bridge_attempt_unsubscribe to false will disable sending the unsubscribe request. Defaults to true.

  • bridge_bind_address ip addressbridge_max_packet_size value

If you need to have the bridge connect over a particular network interface, use bridge_bind_address to tell the bridge which local IP address the socket should bind to, e.g. bridge_bind_address 192.168.1.10.

If you wish to restrict the size of messages sent to a remote bridge, use this option. This sets the maximum number of bytes for the total message, including headers and payload. Note that MQTT v5 brokers may provide their own maximum-packet-size property. In this case, the smaller of the two limits will be used. Set to 0 for "unlimited".

  • bridge_outgoing_retain [ true | false ]

Some MQTT brokers do not allow retained messages. MQTT v5 gives a mechanism for brokers to tell clients that they do not support retained messages, but this is not possible for MQTT v3.1.1 or v3.1. If you need to bridge to a v3.1.1 or v3.1 broker that does not support retained messages, set the bridge_outgoing_retain option to false. This will remove the retain bit on all outgoing messages to that bridge, regardless of any other setting. Defaults to true.

  • bridge_protocol_version version

Set the version of the MQTT protocol to use with for this bridge. Can be one of mqttv50, mqttv311 or mqttv31. Defaults to mqtt v.3.1.1.

  • cleansession [ true | false ]

Set the clean session option for this bridge. Setting to false (the default), means that all subscriptions on the remote broker are kept in case of the network connection dropping. If set to true, all subscriptions and messages on the remote broker will be cleaned up if the connection drops. Note that setting to true may cause a large amount of retained messages to be sent each time the bridge reconnects.

If you are using bridges with cleansession set to false (the default), then you may get unexpected behaviour from incoming topics if you change what topics you are subscribing to. This is because the remote broker keeps the subscription for the old topic. If you have this problem, connect your bridge with cleansession set to true, then reconnect with cleansession set to false as normal.

  • local_cleansession [ true | false]

The regular cleansession covers both the local subscriptions and the remote subscriptions. local_cleansession allows splitting this. Setting false will mean that the local connection will preserve subscription, independent of the remote connection.

Defaults to the value of bridge.cleansession unless explicitly specified.

  • connection name

This variable marks the start of a new bridge connection. It is also used to give the bridge a name which is used as the client id on the remote broker.

  • keepalive_interval seconds

Set the number of seconds after which the bridge should send a ping if no other traffic has occurred. Defaults to 60. A minimum value of 5 seconds is allowed.

  • idle_timeout seconds

Set the amount of time a bridge using the lazy start type must be idle before it will be stopped. Defaults to 60 seconds.

  • local_clientid id

Set the clientid to use on the local broker. If not defined, this defaults to local.<remote_clientid>. If you are bridging a broker to itself, it is important that local_clientid and remote_clientid do not match.

  • local_password password

Configure the password to be used when connecting this bridge to the local broker. This may be important when authentication and ACLs are being used.

  • local_username username

Configure the username to be used when connecting this bridge to the local broker. This may be important when authentication and ACLs are being used.

  • notifications [ true | false ]

If set to true, publish notification messages to the local and remote brokers giving information about the state of the bridge connection. Retained messages are published to the topic $SYS/broker/connection/<remote_clientid>/state unless otherwise set with notification_topics. If the message is 1 then the connection is active, or 0 if the connection has failed. Defaults to true.

This uses the Last Will and Testament (LWT) feature.

Read more about Last Will Testament.

  • notifications_local_only [ true | false ]

If set to true, only publish notification messages to the local broker giving information about the state of the bridge connection. Defaults to false.

  • notification_topic topic

Choose the topic on which notifications will be published for this bridge. If not set the messages will be sent on the topic $SYS/broker/connection/<remote_clientid>/state.

  • remote_clientid id

Set the client id for this bridge connection. If not defined, this defaults to 'name.hostname', where name is the connection name and hostname is the hostname of this computer.

This replaces the old "clientid" option to avoid confusion with local/remote sides of the bridge. "clientid" remains valid for the time being.

  • remote_password value

Configure a password for the bridge. This is used for authentication purposes when connecting to a broker that supports MQTT v3.1 and up and requires a username and/or password to connect. This option is only valid if a remote_username is also supplied.

This replaces the old "password" option to avoid confusion with local/remote sides of the bridge. "password" remains valid for the time being.

  • remote_username name

Configure a username for the bridge. This is used for authentication purposes when connecting to a broker that supports MQTT v3.1 and up and requires a username and/or password to connect. See also the remote_password option.

This replaces the old "username" option to avoid confusion with local/remote sides of the bridge. "username" remains valid for the time being.

  • restart_timeout base cap, restart_timeout constant

Set the amount of time a bridge using the automatic start type will wait until attempting to reconnect.

This option can be configured to use a constant delay time in seconds, or to use a backoff mechanism based on "Decorrelated Jitter", which adds a degree of randomness to when the restart occurs, starting at the base and increasing up to the cap. Set a constant timeout of 20 seconds:

restart_timeout 20

Set backoff with a base (start value) of 10 seconds and a cap (upper limit) of 60 seconds:

restart_timeout 10 30

Defaults to jitter with a base of 5 seconds and cap of 30 seconds.

  • round_robin [ true | false ]

If the bridge has more than one address given in the address/addresses configuration, the round_robin option defines the behaviour of the bridge on a failure of the bridge connection. If round_robin is false, the default value, then the first address is treated as the main bridge connection. If the connection fails, the other secondary addresses will be attempted in turn. Whilst connected to a secondary bridge, the bridge will periodically attempt to reconnect to the main bridge until successful.

If round_robin is true, then all addresses are treated as equals. If a connection fails, the next address will be tried and if successful will remain connected until it fails.

  • start_type [ automatic | lazy | once ]

Set the start type of the bridge. This controls how the bridge starts and can be one of three types: automatic, lazy and once. Note that RSMB provides a fourth start type "manual" which isn't currently supported by mosquitto.

automatic is the default start type and means that the bridge connection will be started automatically when the broker starts and also restarted after a short delay (30 seconds) if the connection fails.

Bridges using the lazy start type will be started automatically when the number of queued messages exceeds the number set with the threshold option. It will be stopped automatically after the time set by the idle_timeout parameter. Use this start type if you wish the connection to only be active when it is needed.

A bridge using the once start type will be started automatically when the broker starts but will not be restarted if the connection fails.

  • threshold count

Set the number of messages that need to be queued for a bridge with lazy start type to be restarted. Defaults to 10 messages.

  • topic pattern [[[ out | in | both ] qos-level] local-prefix remote-prefix]

Define a topic pattern to be shared between the two brokers. Any topics matching the pattern (which may include wildcards) are shared. The second parameter defines the direction that the messages will be shared in, so it is possible to import messages from a remote broker using in, export messages to a remote broker using out or share messages in both directions. If this parameter is not defined, the default of out is used. The QoS level defines the publish/subscribe QoS level used for this topic and defaults to 0.

The local-prefix and remote-prefix options allow topics to be remapped when publishing to and receiving from remote brokers. This allows a topic tree from the local broker to be inserted into the topic tree of the remote broker at an appropriate place.

For incoming topics, the bridge will prepend the pattern with the remote prefix and subscribe to the resulting topic on the remote broker. When a matching incoming message is received, the remote prefix will be removed from the topic and then the local prefix added.

For outgoing topics, the bridge will prepend the pattern with the local prefix and subscribe to the resulting topic on the local broker. When an outgoing message is processed, the local prefix will be removed from the topic then the remote prefix added.

When using topic mapping, an empty prefix can be defined using the place marker "". Using the empty marker for the topic itself is also valid. The table below defines what combination of empty or value is valid. The Full Local Topic and Full Remote Topic show the resulting topics that would be used on the local and remote ends of the bridge. For example, for the first table row if you publish to L/topic on the local broker, then the remote broker will receive a message on the topic R/topic.

To remap an entire topic tree, use e.g.:

topic # both 2 local/topic/ remote/topic/

The configuration below connects a bridge to the broker at test.mosquitto.org. It subscribes to the remote topic $SYS/broker/clients/total and republishes the messages received to the local topic test/mosquitto/org/clients/total

This option can be specified multiple times per bridge.

Care must be taken to ensure that loops are not created with this option. If you are experiencing high CPU load from a broker, it is possible that you have a loop where each broker is forever forwarding each other the same messages.

See also the cleansession option if you have messages arriving on unexpected topics when using incoming topics.

Example Bridge Topic Remapping:

connection test-mosquitto-org address test.mosquitto.org cleansession true topic clients/total in 0 test/mosquitto/org/ $SYS/broker/

try_private [ true | false ]

If try_private is set to true, the bridge will attempt to indicate to the remote broker that it is a bridge not an ordinary client. If successful, this means that loop detection will be more effective and that retained messages will be propagated correctly. Not all brokers support this feature so it may be necessary to set try_private to false if your bridge does not connect properly.

Defaults to true.

TLS Support

tcpTLS

The following options are available for all bridges to configure SSL/TLS support.

  • bridge_alpn alpn

Configure the application layer protocol negotiation option for the TLS session. Useful for brokers that support both websockets and MQTT on the same port.

  • bridge_cafile file path

bridge_cafile is used to define the path to a file containing the PEM encoded CA certificates that have signed the certificate for the remote broker.

One of bridge_cafile or bridge_capath must be provided to allow SSL/TLS support.

  • bridge_capath file path

One of bridge_capath or bridge_cafile must be provided to allow SSL/TLS support.

bridge_capath is used to define the path to a directory containing the PEM encoded CA certificates that have signed the certificate for the remote broker. For bridge_capath to work correctly, the certificate files must have ".crt" as the file ending and you must run "openssl rehash \<path to bridge_capath>" each time you add/remove a certificate.

  • bridge_certfile file path

Path to the PEM encoded client certificate for this bridge, if required by the remote broker.

Pre-shared-key encryption provides an alternative to certificate based encryption. A bridge can be configured to use PSK with the bridge_identity and bridge_psk options. This is the client identity used with PSK encryption. Only one of certificate and PSK based encryption can be used on one bridge at once.

  • bridge_identity identity

When using certificate based TLS, the bridge will attempt to verify the hostname provided in the remote certificate matches the host/address being connected to. This may cause problems in testing scenarios, so bridge_insecure may be set to true to disable the hostname verification.

  • bridge_insecure [ true | false ]

Setting this option to true means that a malicious third party could potentially impersonate your server, so it should always be set to false in production environments.

  • bridge_keyfile file path

Path to the PEM encoded private key for this bridge, if required by the remote broker.

  • bridge_psk key

Pre-shared-key encryption provides an alternative to certificate based encryption. A bridge can be configured to use PSK with the bridge_identity and bridge_psk options. This is the pre-shared-key in hexadecimal format with no "0x". Only one of certificate and PSK based encryption can be used on one bridge at once.

  • bridge_require_ocsp [ true | false ]

When set to true, the bridge requires OCSP on the TLS connection it opens as client.

  • bridge_tls_version version

Configure the version of the TLS protocol to be used for this bridge. Possible values are tlsv1.3, tlsv1.2 and tlsv1.1. Defaults to tlsv1.2. The remote broker must support the same version of TLS for the connection to succeed.

Heap Configuration

As the document queue fills with unprocessed messages, it consumes heap memory. Further memory is consumed for document processing like parsing and indexing. The combined heap memory consumption must be less than the maximum heap size of the process.

  • memory_limit limit

This option sets the maximum number of heap memory bytes that the broker will allocate, and hence sets a hard limit on memory use by the broker. Memory requests that exceed this value will be denied. The effect will vary depending on what has been denied. If an incoming message is being processed, then the message will be dropped and the publishing client will be disconnected. If an outgoing message is being sent, then the individual message will be dropped and the receiving client will be disconnected. Defaults to no limit.

This option is only available if memory tracking support is compiled in.

Reloaded on reload signal. Setting to a lower value and reloading will not result in memory being freed.

Further options to avoid heap

  • message_size_limit limit

This option sets the maximum publish payload size that the broker will allow. Received messages that exceed this size will not be accepted by the broker. This means that the message will not be forwarded on to subscribing clients, but the QoS flow will be completed for QoS 1 or QoS 2 messages. MQTT v5 clients using QoS 1 or QoS 2 will receive a PUBACK or PUBREC with the "implementation specific error" reason code.

The default value is 0, which means that all valid MQTT messages are accepted. MQTT imposes a maximum payload size of 268435455 bytes.

This option applies globally.

Reloaded on reload signal.

  • max_packet_size value

For MQTT v5 clients, it is possible to have the server send a "maximum packet size" value that will instruct the client it will not accept MQTT packets with size greater than value bytes. This applies to the full MQTT packet, not just the payload. Setting this option to a positive value will set the maximum packet size to that number of bytes. If a client sends a packet which is larger than this value, it will be disconnected. This applies to all clients regardless of the protocol version they are using, but v3.1.1 and earlier clients will of course not have received the maximum packet size information. Defaults to no limit.

This option applies to all clients, not just those using MQTT v5, but it is not possible to notify clients using MQTT v3.1.1 or MQTT v3.1 of the limit.

Setting below 20 bytes is forbidden because it is likely to interfere with normal client operation even with small payloads.

This option applies globally.

Reloaded on reload signal.

Incoming byte rate

  • max_inflight_bytes count

Outgoing QoS 1 and 2 messages will be allowed in flight until this byte limit is reached. This allows control of outgoing message rate based on message size rather than message count. If the limit is set to 100, messages of over 100 bytes are still allowed, but only a single message can be in flight at once. Defaults to 0. (No limit).

See also the max_inflight_messages option.

This option applies globally.

Reloaded on reload signal.

  • max_queued_bytes count

The number of outgoing QoS 1 and 2 messages above those currently in-flight will be queued (per client) by the broker. Once this limit has been reached, subsequent messages will be silently dropped. This is an important option if you are sending messages at a high rate and/or have clients who are slow to respond or may be offline for extended periods of time. Defaults to 0. (No maximum).

See also the max_queued_messages option. If both max_queued_messages and max_queued_bytes are specified, packets will be queued until the first limit is reached.

This option applies globally.

Reloaded on reload signal.

  • max_queued_messages count

The maximum number of QoS 1 or 2 messages to hold in the queue (per client) above those messages that are currently in flight. Defaults to 1000. Set to 0 for no maximum (not recommended). See also the queue_qos0_messages and max_queued_bytes options.

This option applies globally.

Reloaded on reload signal.

Plugin

  • plugin_opt_* value

Options to be passed to the most recent plugin defined in the configuration file. See the specific plugin instructions for details of what options are available.

Applies to the current plugin being configured.

This is also available as the auth_opt_* option, but this use is deprecated and will be removed in a future version.

  • plugin file path

Specify an external module to use for authentication and access control. This allows custom username/password and access control functions to be created.

Can be specified multiple times to load multiple plugins. The plugins will be processed in the order that they are specified.

If password_file, or acl_file are used in the config file alongsize plugin, the plugin checks will run after the built in checks.

Not currently reloaded on reload signal.

See also Security.

This is also available as the auth_plugin option, but this use is deprecated and will be removed in a future version.