Configuration reference

Every orbitmq.toml key with its type, default and environment override.

OrbitMQ reads one TOML file. Unknown keys are errors, so a typo stops the broker from starting instead of being ignored.

Loading order

  1. The file named by --config <path> (or -c <path>).
  2. Otherwise the file named by the ORBITMQ_CONFIG environment variable.
  3. Otherwise ./orbitmq.toml in the working directory, if it exists.
  4. Otherwise built-in defaults.

Environment variables are applied on top of the file. An empty variable is ignored. Boolean variables accept 1, true, yes, on, 0, false, no and off. Keys marked "none" in the Env column can only be set in the file.

Top level

Process-wide settings. listen adds a plain TCP listener named default; more listeners are declared with [[listener]] tables.

KeyTypeDefaultEnvDescription
listenstring (host:port)unsetORBITMQ_LISTENAddress of a plain TCP listener named default, bound before any [[listener]]. When unset, 0.0.0.0:1883 is used only if no [[listener]] table exists.
coresinteger0ORBITMQ_CORESNumber of data-plane cores (event-loop threads). 0 starts one per CPU.
logstring"info"ORBITMQ_LOGLog filter in tracing env-filter syntax, for example info or info,orbitmq_core=debug. An invalid filter falls back to info. Logs are written to stderr.
pin_threadsbooleantrueORBITMQ_PIN_THREADSPin each core thread to its own CPU. Skipped under a CPU quota without a cpuset; see Containers.
ring_capacityinteger4096ORBITMQ_RING_CAPACITYCapacity of each core-to-core message ring. Values below 16 are raised to 16.
connect_timeout_secsinteger (seconds)10ORBITMQ_CONNECT_TIMEOUT_SECSTime allowed between accepting a network connection and receiving CONNECT. Values below 1 are raised to 1.

[[listener]]

Zero or more named listeners. Each table adds one listener. The example file declares a WebSocket listener for illustration; it is not a default. When no [[listener]] table exists and listen is unset, the broker listens on 0.0.0.0:1883.

KeyTypeDefaultEnvDescription
namestringrequirednoneUnique, non-empty listener name. It labels the per-listener metrics and is reported by GET /api/v1/status. default is taken when listen is set.
bindstring (host:port)requirednoneAddress to bind.
kind"tcp", "tls", "ws" or "wss""tcp"noneTransport: plain MQTT over TCP, MQTT over TLS, MQTT over WebSocket, or MQTT over WebSocket over TLS.
proxy_protocolbooleanfalsenoneExpect a PROXY protocol v1 or v2 header before anything else, and use the client address it carries. Connections without a valid header are closed.
trusted_proxiesarray of strings (IP addresses or CIDR blocks)[]noneWith proxy_protocol = true: the load balancers allowed to send the PROXY header. Connections from any other peer are closed before the header is read. Empty, any peer may send it and a warning is logged at start-up. Setting it without proxy_protocol = true is an error. See Behind a load balancer.
handshake_timeoutinteger (seconds)10noneTime allowed for the PROXY header, TLS handshake and WebSocket upgrade together. Values below 1 are raised to 1.
max_connectionsinteger0noneMost connections open on this listener at once. 0 means unlimited. Further CONNECTs are refused with Server Busy (5.0) or Server unavailable (3.x).
max_handshakesinteger10000noneMost connections on this listener still waiting for their CONNECT (PROXY header, TLS handshake and WebSocket upgrade included). Further connections are closed at once, without a CONNACK. 0 means unlimited. The listener created by listen uses the default; declare it as a [[listener]] to change it.
max_connections_per_ipinteger0noneMost connections open on this listener from one client address: an IPv4 address or an IPv6 /64 (behind a PROXY header, the address it carries). Further connections are closed before their CONNECT. 0 means unlimited.
max_accept_rateinteger (connections per second)0noneMost connections accepted on this listener per second, in bursts of up to one second's worth. Further connections are closed at once. 0 means unlimited.

[listener.tls]

TLS settings of the listener declared just above. Required for kind = "tls" and kind = "wss", and rejected for any other kind.

KeyTypeDefaultEnvDescription
certpathrequirednonePEM certificate chain, leaf certificate first.
keypathrequirednonePEM private key (PKCS#8, PKCS#1 or SEC1).
client_capathunsetnonePEM CA bundle used to verify client certificates (mutual TLS). Without require_client_cert, a certificate is requested and verified when presented, but not required.
require_client_certbooleanfalsenoneRefuse clients without a valid certificate. Needs client_ca.
alpnarray of strings[]noneALPN protocol names to advertise, for example ["mqtt"]. None by default.
session_resumptionbooleantruenoneTLS session resumption: TLS 1.3 tickets (one per handshake, always with a fresh key exchange), the TLS 1.2 session-ID cache and, with tls12_tickets = true, TLS 1.2 tickets. Ticket keys are per listener, rotate every 6 hours and stay in memory. 0-RTT is always off. false makes every connection run a full handshake. See TLS session resumption.
session_cache_sizeinteger (entries)16384noneEntries of the in-memory session-ID cache, through which TLS 1.2 clients resume (all of them while tls12_tickets = false). 0 means no cache. Has no effect when session_resumption = false.
tls12_ticketsbooleanfalseORBITMQ_TLS_TLS12_TICKETSIssue session tickets to TLS 1.2 clients. Off, TLS 1.2 clients resume through the session-ID cache only. On, they can resume statelessly, but TLS 1.2 resumption skips the key exchange, so anyone who obtains the ticket key while it is valid can decrypt the TLS 1.2 sessions it covered. TLS 1.3 tickets are not affected. The environment variable applies to every TLS listener.
key_exchange"client-preferred" or "hybrid-preferred""client-preferred"ORBITMQ_TLS_KEY_EXCHANGEKey-exchange group selection. client-preferred: X25519, P-256, P-384 and the post-quantum hybrid X25519MLKEM768 are offered and the client's order of preference decides, so a client that prefers the hybrid gets it. hybrid-preferred: X25519MLKEM768 whenever the client offers it at all (a client that did not send a hybrid key share pays one extra round trip), classical groups otherwise; this costs some handshake throughput. The environment variable applies to every TLS listener. See Key exchange.

[listener.ws]

WebSocket settings of the listener declared just above. Optional for kind = "ws" and kind = "wss", and rejected for any other kind.

KeyTypeDefaultEnvDescription
pathstring"/mqtt"noneHTTP request path that accepts the WebSocket upgrade (query strings are ignored). Must start with /. Other paths get 404.
max_frame_sizeinteger (bytes)16777216noneLargest WebSocket frame payload accepted (default 16 MiB). A larger frame closes the connection with close code 1009. Must be non-zero.
max_handshake_sizeinteger (bytes)8192noneLargest HTTP upgrade request accepted (default 8 KiB). A larger request gets 431. Must be non-zero.
require_subprotocolbooleantruenoneRefuse clients that offer neither the mqtt nor the mqttv3.1 subprotocol with 400. With false such clients are accepted without a subprotocol.

[mqtt]

MQTT protocol limits. Every default is the behaviour the specification describes, so a default broker announces nothing unusual. A value that differs is announced to MQTT 5.0 clients in CONNACK where the specification defines a property for it. See the limits guide for the effect of each limit. Every key can be overridden with ORBITMQ_ plus the upper-case key name.

KeyTypeDefaultEnvDescription
max_packet_sizeinteger (bytes)268435460ORBITMQ_MAX_PACKET_SIZE, ORBITMQ_MAXIMUM_PACKET_SIZELargest packet accepted from clients, fixed header included. Also accepted as maximum_packet_size (file and ORBITMQ_MAXIMUM_PACKET_SIZE). Must be non-zero.
max_connect_packet_sizeinteger (bytes)1048576ORBITMQ_MAX_CONNECT_PACKET_SIZELargest packet accepted before the CONNECT is accepted, which is the CONNECT itself; the lower of this and max_packet_size applies. A larger CONNECT is refused with CONNACK Packet too large (5.0) or the connection is closed (3.x). 0 means max_packet_size.
receive_maximuminteger (1 to 65535)65535ORBITMQ_RECEIVE_MAXIMUMHow many QoS 1 and QoS 2 PUBLISH packets a client may have unacknowledged towards the broker. Must be non-zero.
topic_alias_maximuminteger (0 to 65535)32ORBITMQ_TOPIC_ALIAS_MAXIMUMHighest Topic Alias accepted from MQTT 5.0 clients. 0 accepts no aliases.
maximum_qosinteger (0, 1 or 2)2ORBITMQ_MAXIMUM_QOSHighest QoS the broker supports.
retain_availablebooleantrueORBITMQ_RETAIN_AVAILABLEWhether retained messages are supported.
wildcard_subscriptionsbooleantrueORBITMQ_WILDCARD_SUBSCRIPTIONSWhether subscriptions with + or # are accepted.
subscription_identifiersbooleantrueORBITMQ_SUBSCRIPTION_IDENTIFIERSWhether MQTT 5.0 Subscription Identifiers are accepted.
shared_subscriptionsbooleantrueORBITMQ_SHARED_SUBSCRIPTIONSWhether shared subscriptions ($share/{group}/{filter}) are supported.
shared_subscriptions_v3booleanfalseORBITMQ_SHARED_SUBSCRIPTIONS_V3Also treat $share/{group}/{filter} as a shared subscription for MQTT 3.1 and 3.1.1 clients. Off by default, where it is an ordinary topic filter, as those specifications define.
server_keep_aliveinteger (seconds)0ORBITMQ_SERVER_KEEP_ALIVEWhen greater than 0, the keep alive imposed on MQTT 5.0 clients instead of the one they request. 0 keeps the client value.
max_session_expiryinteger (seconds)4294967295ORBITMQ_MAX_SESSION_EXPIRYUpper bound for the Session Expiry Interval. The default, 4294967295, means a session may never expire. MQTT 3.x persistent sessions (clean session 0) are kept for this long.
max_message_expiryinteger (seconds)0ORBITMQ_MAX_MESSAGE_EXPIRYLongest lifetime of a message. Messages without a Message Expiry Interval, or with a longer one, expire after this. 0 means unlimited.
max_inflightinteger (1 to 65535)65535ORBITMQ_MAX_INFLIGHTMost unacknowledged QoS 1 and QoS 2 messages the broker sends to one client. The client Receive Maximum is honoured as well. Must be non-zero.
max_queued_messagesinteger10000ORBITMQ_MAX_QUEUED_MESSAGESMessages queued per session while the in-flight window is full or the client is offline. Further QoS 1 and QoS 2 messages are dropped.
max_queued_bytesinteger (bytes)16777216ORBITMQ_MAX_QUEUED_BYTESBytes queued per session. Each message is charged its topic, payload and forwarded properties plus 320 bytes. Beyond it, further QoS 1 and QoS 2 messages are dropped. 0 = unlimited.
max_queued_memoryinteger (bytes)0ORBITMQ_MAX_QUEUED_MEMORYNode-wide memory budget: queued, in-flight and retained messages, read and outbound buffers. Split equally between the cores. Above its share, a core drops the oldest messages of its longest queues, then closes connections holding large partial packets or stuck output. 0 = derive it from max_queued_memory_percent.
max_queued_memory_percentinteger (percent)25ORBITMQ_MAX_QUEUED_MEMORY_PERCENTNode-wide memory budget as a percentage of the memory limit (the cgroup limit, else physical memory, else an assumed 4 GiB), used when max_queued_memory is 0. At most 100. 0 = no node-wide budget.
max_buffered_bytesinteger (bytes)8388608ORBITMQ_MAX_BUFFERED_BYTESBytes buffered for one connection before QoS 0 deliveries are dropped and QoS 1 and QoS 2 deliveries wait in the session queue.
max_client_id_leninteger65535ORBITMQ_MAX_CLIENT_ID_LENLongest client identifier accepted, in bytes. MQTT 3.1 clients are limited to 23 characters by their specification regardless.
allow_empty_client_idbooleantrueORBITMQ_ALLOW_EMPTY_CLIENT_IDAccept a zero-length client identifier and assign a unique one (MQTT 3.1.1 requires clean session 1 for this).
outbound_topic_aliasesbooleantrueORBITMQ_OUTBOUND_TOPIC_ALIASESAssign Topic Aliases on PUBLISH packets sent to MQTT 5.0 clients that declare a Topic Alias Maximum.
queue_qos0_offlinebooleanfalseORBITMQ_QUEUE_QOS0_OFFLINEQueue QoS 0 messages for offline persistent sessions.
max_connectionsinteger0ORBITMQ_MAX_CONNECTIONSMost connections open on the node at once. 0 means unlimited. Further CONNECTs are refused with Server Busy (5.0, reason code 0x89) or Server unavailable (3.x, return code 3).
max_retained_messagesinteger0ORBITMQ_MAX_RETAINED_MESSAGESRetained messages per core shard. 0 means unlimited. A new retained topic beyond the limit is not stored (a warning is logged); the message is still delivered to current subscribers.
max_retained_bytesinteger (bytes)0ORBITMQ_MAX_RETAINED_BYTESBytes of retained messages per core shard. 0 means unlimited. Same behaviour as max_retained_messages when exceeded.

[auth]

Settings of both chains: the chain ends, superusers, the authentication timeout and the state file that keeps runtime changes. Every key can be overridden with ORBITMQ_AUTH_ plus the upper-case key name; lists are comma-separated. See Authentication and Authorization.

KeyTypeDefaultEnvDescription
allow_anonymousbooleanunsetORBITMQ_AUTH_ALLOW_ANONYMOUSAuthentication chain end for clients without a user name that no source accepted or refused: true lets them in, false refuses them with 0x87 Not Authorized (3.x return code 5). A client that sends a user name nobody accepts is always refused with 0x86 when the chain has a source. false requires an [[authentication]] source. Unset, it is false while the chain has a source and true otherwise. true with a source that has on_error = "ignore" is fail-open.
superusersarray of strings[]ORBITMQ_AUTH_SUPERUSERSUser names that become superusers once any authentication source has accepted them: authorization sources with superuser_bypass = true allow them before their rules, and ACL-file rules with who = "superuser" match them. Anonymous clients are never superusers. Requires an [[authentication]] source; empty names are rejected. The environment variable takes a comma-separated list.
timeout_msinteger (milliseconds)5000ORBITMQ_AUTH_TIMEOUT_MSTime allowed for the whole authentication of one CONNECT, ACL loads included. When it runs out the client is refused with 0x88 Server Unavailable (3.x return code 3). Values below 1 are raised to 1.
no_match"deny", "allow" or "ignore""deny"ORBITMQ_AUTH_NO_MATCHAuthorization chain end: the decision when every enabled [[authorization]] source answered ignore. ignore leaves the action to an authorizer registered after the chain, if any; without one it is refused. An empty authorization chain allows everything regardless.
state_filepathunsetORBITMQ_AUTH_STATE_FILEWhere runtime changes of the chains (admin API, dashboard) are written (mode 0600). Unset, orbitmq.auth-state.toml in the directory of the configuration file is used. While it exists it replaces every [[authentication]] and [[authorization]] table at start-up; an invalid state file stops the broker. Without a configuration file and without this key, changes are kept in memory only. See The state file.
verify_concurrencyinteger0ORBITMQ_AUTH_VERIFY_CONCURRENCYPassword-hash verifications of password_file sources running at once per core. 0 picks the CPUs divided by the cores, at least 2. See Hashing limits.
verify_queueinteger1024ORBITMQ_AUTH_VERIFY_QUEUEVerifications waiting per core once verify_concurrency are running. Further clients are refused with 0x89 Server Busy (3.x return code 3, server unavailable).

[[authentication]]

The authentication chain: each table adds one source, tried in file order (the order can be changed at runtime). Every table has a kind and the common keys below; the other keys belong to the kind and are described in Source kinds. Unknown keys, and keys of the other chain, are errors. These keys have no environment overrides, but secrets can be read from an environment variable or a file ({ env = "NAME" }, { file = "/path" }). While the state file exists, its chains replace these tables.

KeyTypeDefaultEnvDescription
kind"password_file", "x509", "jwt", "http", "postgres", "mysql", "redis" or "mongodb"requirednoneSource kind. orbitmq --help lists the kinds compiled into the binary; the default build has all of them.
namestringthe kindnoneUnique name in the chain: 1 to 64 letters, digits, -, _ or .. Used in logs, metrics and the admin API. Two sources of one kind need distinct names.
pathpathrequiredORBITMQ_AUTH_PASSWORD_FILEkind = "password_file": the password file (username:hash lines as printed by orbitmqctl passwd), read when the source is built. The environment variable appends a password_file source named password_file at the end of the chain.
urlstring or secretrequirednonehttp: the endpoint (a plain string). postgres, mysql, redis and mongodb: the connection URL, a secret. The same key exists on [[authorization]] sources of these kinds; see Source kinds.
databasestringrequirednonekind = "mongodb": the database.
collectionstringrequirednonekind = "mongodb": the user collection.
enabledbooleantruenoneDisabled sources are skipped. Can be changed at runtime.
timeout_msinteger (milliseconds)3000noneNetwork kinds: time allowed for one check. A timeout is a backend error (on_error). Values below 1 are raised to 1.
on_error"deny" or "ignore""deny"noneBackend errors, timeouts and max_in_flight overflow. deny refuses the client with 0x88 Server Unavailable (fail closed); ignore passes it to the next source.
on_not_found"ignore" or "deny""ignore"noneUnknown users (not in the password file; no row, key or document; an HTTP ignore answer). ignore passes to the next source; deny refuses with 0x86 Bad User Name or Password.
max_in_flightinteger256noneNetwork kinds: most checks running at once. Further clients are treated as a backend error (on_error).

[[authorization]]

The authorization chain: each table adds one source, asked in file order for every PUBLISH and SUBSCRIBE. Same rules as [[authentication]]; the kinds are described in Authorization sources.

KeyTypeDefaultEnvDescription
kind"file", "jwt", "http", "postgres", "mysql", "redis" or "mongodb"requirednoneSource kind. file evaluates an ACL file; the other kinds load each client's rules once, at CONNECT.
pathpathrequiredORBITMQ_AUTH_ACL_FILEkind = "file": the ACL file (TOML), read when the source is built. The environment variable appends a file source named acl_file at the end of the chain.
superuser_bypassbooleantruenoneAllow superusers before this source's rules. With false the rules apply to superusers too (where who = "superuser" rules can match).
no_match"ignore", "deny" or "allow""ignore"noneThis source's decision when none of its rules matches. ignore lets the next source decide.
namestringthe kindnoneUnique name in the chain, as for [[authentication]].
enabledbooleantruenoneDisabled sources are skipped and load nothing at CONNECT. Can be changed at runtime.
timeout_msinteger (milliseconds)3000noneNetwork kinds: time allowed for one ACL load at CONNECT. A timeout is a backend error (on_error).
on_error"deny" or "ignore""deny"noneA failed ACL load (error, timeout, max_in_flight overflow, unusable rules). deny: this source denies every action of that session (fail closed); ignore: it answers ignore for that session.
max_in_flightinteger256noneNetwork kinds: most ACL loads running at once.

[authentication.cache]

Decision cache of the network source (jwt, http, postgres, mysql, redis, mongodb) declared just above. [authorization.cache] takes the same keys. See Caching.

KeyTypeDefaultEnvDescription
ttl_secsinteger (seconds)60noneHow long an accepted client, or a client's loaded rules, are remembered. A revoked user can still connect, and changed rules still apply to new sessions, for this long. Never longer than a JWT's exp or an HTTP expire_at. 0 disables positive caching.
negative_ttl_secsinteger (seconds)5noneHow long a refusal or an unknown user is remembered. 0 disables negative caching. Errors are never cached.
max_entriesinteger10000noneMost cached answers for this source; the oldest are evicted first. 0 disables the cache.

[admin]

The admin REST API and the Prometheus /metrics endpoint, served on their own listener. The API starts only when enabled = true and at least one token is configured, or with insecure = true on a loopback address. See Admin REST API.

KeyTypeDefaultEnvDescription
enabledbooleantrueORBITMQ_ADMIN_ENABLEDServe the admin API. It also needs tokens, or insecure = true on a loopback address; otherwise it stays off and an info line is logged.
listenstring (host:port)"127.0.0.1:18083"ORBITMQ_ADMIN_LISTENListen address of the admin API and /metrics, separate from every MQTT listener.
tokensarray of strings[]ORBITMQ_ADMIN_TOKENSAccepted bearer tokens. The environment variable takes a comma-separated list. Empty tokens are rejected. The example file uses the placeholder "change-me".
insecurebooleanfalseORBITMQ_ADMIN_INSECUREServe the API without authentication. Allowed only on a loopback address and only when no tokens are set.
request_timeout_msinteger (milliseconds)2000ORBITMQ_ADMIN_REQUEST_TIMEOUT_MSHow long an API query or /metrics scrape waits for every core to answer before returning 504.
allowed_hostsarray of strings[]ORBITMQ_ADMIN_ALLOWED_HOSTSHost names accepted in the Host header besides IP addresses, localhost and *.localhost (a guard against DNS rebinding). "*" accepts any host. Other requests get 421 host_not_allowed. The environment variable takes a comma-separated list. See Request guards.
max_streamsinteger32ORBITMQ_ADMIN_MAX_STREAMSMost server-sent event streams (/api/v1/logs, /api/v1/metrics/stream) open at once; further ones get 429 too_many_streams.
tlstable (the [listener.tls] keys)unsetnoneServe the admin API, /metrics and the dashboard over HTTPS. Takes the keys of [listener.tls] (cert, key, optional client_ca and require_client_cert, ...); ALPN defaults to http/1.1. Unset, the listener speaks plain HTTP, and a warning is logged when listen is not a loopback address. See TLS.
dashboardbooleantrueORBITMQ_ADMIN_DASHBOARDServe the built-in dashboard at /dashboard/ on the admin listener (/ redirects there). The page files are public; the API they call still needs a token unless insecure is set. Builds without the dashboard feature ignore it.

[rules]

The SQL rule engine. Every key except node can be overridden with ORBITMQ_RULES_ plus the upper-case key name. See Rules and integrations.

KeyTypeDefaultEnvDescription
enabledbooleantrueORBITMQ_RULES_ENABLEDRun the rule engine. With false no publish tap is registered (no cost), [[rule]] tables are ignored with a warning and the rules endpoints of the admin API answer 503 unavailable.
queue_capacityinteger (messages)10000ORBITMQ_RULES_QUEUE_CAPACITYCapacity of each core's queue to the rule evaluation tasks. When it is full, matching messages are dropped for rules and counted (result="dropped"); publishers are never slowed.
action_queue_capacityinteger (messages)10000ORBITMQ_RULES_ACTION_QUEUE_CAPACITYCapacity of each rule action's queue. When it is full, the message is dropped for that action and counted.
workersinteger2ORBITMQ_RULES_WORKERSThreads of the rules runtime (evaluation and delivery), clamped to 1 to 64.
nodestringlocalnoneValue of the node field in rule SQL.
state_filepathunsetORBITMQ_RULES_STATE_FILEKeeps the rules created through the admin API (mode 0600). Unset, orbitmq.rules-state.toml in the directory of the configuration file is used. The stored rules add to the [[rule]] tables. An invalid file stops the start-up. Without a configuration file and without this key, API changes live in memory only. See The rules state file.

[[rule]]

SQL rules, one table each, with their actions as [[rule.action]] tables (type = republish, webhook, mqtt or kafka). Rules defined here are read-only through the admin API. The action keys are described in Actions.

KeyTypeDefaultEnvDescription
idstringrequirednoneUnique id: 1 to 64 characters of A-Z a-z 0-9 - _. test is reserved.
descriptionstring""noneFree text, at most 1024 bytes.
sqlstringrequirednoneSELECT … FROM "topic/filter" [WHERE …]; see The SQL language.
enabledbooleantruenoneWhether the rule runs.

[[rule.action]]

The actions of the rule above, run for every message that passes it. Each type takes its own keys; the most common are listed here, all of them in Actions.

KeyTypeDefaultEnvDescription
type"republish", "webhook", "mqtt" or "kafka"requirednoneWhat the action does. Its other keys depend on the type; see Actions.
topicstring (template)requirednonerepublish, mqtt and kafka: topic to publish or produce to; ${column} inserts an output column.
qosinteger0noneQoS of a republish (0 to 2) or mqtt (0 or 1) action.
urlstringrequirednonewebhook: the https:// URL; plain http:// only for loopback hosts unless allow_http = true.
bodystring (template)unsetnonewebhook: request body template; unset, the output as JSON.
dead_letter_topicstringunsetnoneWhere a message goes once it is given up, instead of being dropped. See Dead letters.
connectorstringrequirednonemqtt and kafka: name of the [[connector]] to use.
keystring (template)unsetnonekafka: record key template; it picks the partition. Unset, records go round-robin.

[[connector]]

Named connections used by mqtt and kafka rule actions. Credentials accept { env = "NAME" } and { file = "/path" }. The keys of each kind are described in Connectors.

KeyTypeDefaultEnvDescription
namestringrequirednoneUnique name used by rule actions: 1 to 64 characters of A-Z a-z 0-9 - _.
kind"mqtt" or "kafka"requirednoneAn MQTT bridge to another broker, or a Kafka producer.
bootstraparray of stringsrequirednoneKafka only: bootstrap brokers as host:port.
tlstableunsetnoneTLS to the remote broker or Kafka; unset, plain TCP. {} uses the bundled and system roots. See TLS.
addressstringrequirednoneMQTT only: host:port of the remote broker.
client_idstringunsetnoneClient identifier sent to the remote broker or Kafka; unset, orbitmq-bridge-<name> (MQTT) or orbitmq (Kafka).
usernamestringunsetnoneMQTT only: user name on the remote broker.
passwordsecretunsetnoneMQTT only: password on the remote broker; inline, { env = "NAME" } or { file = "/path" }.

Command line

FlagEffect
--config <path>, -c <path>Load this file (see the loading order above).
--version, -VPrint the version and exit.
--help, -hPrint usage, the supported protocol levels, the listener keys, the environment variables and the authentication and authorization source kinds compiled into the binary.
--licensesPrint the licence texts and notices of the third-party software compiled into the binary (the same text as GET /licenses.txt on the admin listener) and exit.

An invalid file, value or listener makes orbitmq print the error and exit with status 2. SIGINT or SIGTERM stops the broker gracefully.

Example file

The broker repository ships this file as crates/orbitmq-server/orbitmq.example.toml. Every [mqtt] value in it is the default.

orbitmq.example.toml
# SPDX-License-Identifier: BUSL-1.1
# Copyright (c) 2026 SOFTT
#
# Example orbitmq.toml with every key at its default unless noted.
# Load with `orbitmq --config orbitmq.toml` (or ORBITMQ_CONFIG=path; ./orbitmq.toml is used when present).
# Environment variables override the file (see each key).

# Plain TCP listener named "default" (env ORBITMQ_LISTEN). When unset, 0.0.0.0:1883 is used
# only if no [[listener]] table exists.
listen = "0.0.0.0:1883"
cores = 0                  # data-plane cores, 0 = one per CPU (env ORBITMQ_CORES)
log = "info"               # tracing env-filter (env ORBITMQ_LOG)
pin_threads = true         # not under a CPU quota without a cpuset (env ORBITMQ_PIN_THREADS)
ring_capacity = 4096       # per core-to-core ring (env ORBITMQ_RING_CAPACITY)
connect_timeout_secs = 10  # TCP accept -> CONNECT (env ORBITMQ_CONNECT_TIMEOUT_SECS)

# Additional listeners (example; not a default).
[[listener]]
name = "websocket"
bind = "0.0.0.0:8083"
kind = "ws"                # tcp | tls | ws | wss ([listener.tls] needed for tls/wss)
proxy_protocol = false
# trusted_proxies = ["10.0.0.0/8"]   # with proxy_protocol: load balancers allowed to send the header
handshake_timeout = 10
max_connections = 0        # 0 = unlimited (per listener)
# Pre-authentication limits; refused connections are closed without a CONNACK. The "default"
# listener from `listen` uses these defaults; declare it as a [[listener]] to change them.
max_handshakes = 10000     # connections waiting for their CONNECT (TLS/WS/PROXY included), 0 = unlimited
max_connections_per_ip = 0 # per IPv4 address or IPv6 /64 (the PROXY header's address), 0 = unlimited
max_accept_rate = 0        # connections per second, bursts of one second's worth, 0 = unlimited
[listener.ws]
path = "/mqtt"
max_frame_size = 16777216       # largest WebSocket frame payload (bytes); larger frames close with 1009
max_handshake_size = 8192       # largest upgrade request (bytes)
require_subprotocol = true      # refuse clients offering neither "mqtt" nor "mqttv3.1"

# MQTT limits. Defaults are the specification's; a value that differs is announced to
# MQTT 5.0 clients in CONNACK where the spec defines a property for it.
# Env: ORBITMQ_ + the upper-case key, e.g. ORBITMQ_RECEIVE_MAXIMUM, ORBITMQ_MAXIMUM_PACKET_SIZE.
[mqtt]
max_packet_size = 268435460     # alias maximum_packet_size; CONNACK Maximum Packet Size when lower
max_connect_packet_size = 1048576 # before the CONNECT is accepted (lower of the two applies); a larger
                                # CONNECT gets 5.0 CONNACK 0x95 or a closed connection; 0 = max_packet_size
receive_maximum = 65535         # CONNACK Receive Maximum when lower
topic_alias_maximum = 32        # CONNACK Topic Alias Maximum (0 = no aliases accepted)
maximum_qos = 2                 # CONNACK Maximum QoS when 0 or 1
retain_available = true         # CONNACK Retain Available = 0 when false
wildcard_subscriptions = true   # CONNACK Wildcard Subscription Available = 0 when false
subscription_identifiers = true # CONNACK Subscription Identifiers Available = 0 when false
shared_subscriptions = true     # CONNACK Shared Subscription Available = 0 when false
shared_subscriptions_v3 = false # honour $share/ for MQTT 3.x clients
server_keep_alive = 0           # > 0: CONNACK Server Keep Alive overrides the client's
max_session_expiry = 4294967295 # cap; a lower granted value is announced in CONNACK
max_message_expiry = 0          # seconds, 0 = unlimited; caps (and sets) message lifetime
max_inflight = 65535            # unacknowledged QoS 1/2 messages towards one client
max_queued_messages = 10000     # per session; further QoS 1/2 messages are dropped (full load: 100000)
max_queued_bytes = 16777216     # per session (topic + payload + 320 B each), 0 = unlimited (full load: 67108864)
max_queued_memory = 0           # node-wide memory budget in bytes, 0 = use the percentage; counts
                                # queued, in-flight and retained messages, read and outbound buffers
max_queued_memory_percent = 25  # of the memory limit (cgroup, else RAM; 4 GiB if unknown); 0 = no budget;
                                # above it the longest queues drop their oldest messages, then large
                                # partial packets and stuck connections are closed
max_buffered_bytes = 8388608    # per connection before QoS 0 is dropped
max_client_id_len = 65535
allow_empty_client_id = true
outbound_topic_aliases = true
queue_qos0_offline = false
max_connections = 0             # node-wide, 0 = unlimited (refused with 0x89 / return code 3)
max_retained_messages = 0       # per core shard, 0 = unlimited
max_retained_bytes = 0          # per core shard, 0 = unlimited

# Env: ORBITMQ_AUTH_ + the upper-case key; lists are comma-separated.
[auth]
# Chain end for clients without a user name. Unset: true while the authentication chain has no
# source, false as soon as it has one. Together with on_error = "ignore" on a source, true is
# fail-open: during an outage of that source, clients without a user name connect anonymously.
# allow_anonymous = false
superusers = []                 # users made superusers by whichever source authenticated them
timeout_ms = 5000               # whole authentication of one CONNECT, ACL loads included
no_match = "deny"               # authorization chain end: deny | allow | ignore
# state_file = "/var/lib/orbitmq/orbitmq.auth-state.toml"   # default: next to this file
verify_concurrency = 0          # password-file hash checks running per core (0 = auto: CPUs / cores, at least 2)
verify_queue = 1024             # waiting per core; beyond it clients are refused with Server Busy

# Authentication chain: sources are tried in this order; the first allow or deny
# wins, `ignore` (no user name, unknown user, ...) passes to the next. Reorder, enable and
# edit them at runtime from the dashboard or /api/v1/auth/authentication (kept in state_file).
# [[authentication]]
# kind = "password_file"        # password_file | x509 | jwt | http | postgres | mysql | redis | mongodb
# name = "local"
# path = "/etc/orbitmq/passwords"   # lines from `orbitmqctl passwd`
#
# [[authentication]]
# kind = "mongodb"
# url = { env = "MONGO_URL" }
# database = "mqtt"
# collection = "users"

# Authorization chain: asked in this order for every PUBLISH and SUBSCRIBE, independent of
# the source that authenticated the client. Database sources load the client's rules once,
# at CONNECT.
# [[authorization]]
# kind = "file"                 # file | jwt | http | postgres | mysql | redis | mongodb
# path = "/etc/orbitmq/acl.toml"
# superuser_bypass = true
# no_match = "ignore"           # when none of this source's rules matches

# Management REST API (/api/v1/...) and Prometheus /metrics, on a separate listener.
# It starts only with at least one token, or with insecure = true on a loopback address.
[admin]
enabled = true                  # env ORBITMQ_ADMIN_ENABLED
listen = "127.0.0.1:18083"      # env ORBITMQ_ADMIN_LISTEN
tokens = ["change-me"]          # env ORBITMQ_ADMIN_TOKENS (comma-separated); example value
insecure = false                # env ORBITMQ_ADMIN_INSECURE
request_timeout_ms = 2000       # how long a query waits for every core (env ORBITMQ_ADMIN_REQUEST_TIMEOUT_MS)
allowed_hosts = []              # Host names besides IP addresses and localhost (DNS rebinding guard); "*" = any
max_streams = 32                # log and metrics event streams open at once
# tls = { cert = "/etc/orbitmq/admin.pem", key = "/etc/orbitmq/admin.key" }   # HTTPS (the [listener.tls] keys)

# SQL rule engine: rules run over published messages and hand each result to
# actions (republish, webhook, MQTT bridge, Kafka). Rules can also be created at runtime from
# the dashboard or /api/v1/rules (kept in state_file). Env: ORBITMQ_RULES_ + the upper-case key
# (all but node).
[rules]
enabled = true                  # false: no tap, no cost; [[rule]] tables are ignored
queue_capacity = 10000          # per core, messages waiting for evaluation
action_queue_capacity = 10000   # per action
workers = 2                     # threads of the rules runtime
# node = "local"                # value of the `node` field in rules
# state_file = "/var/lib/orbitmq/orbitmq.rules-state.toml"   # default: next to this file

# A rule: SELECT <columns> FROM "<topic filter>"[, ...] [WHERE <condition>], and its actions.
# Templates insert output columns with ${column} or ${column.path}.
# [[rule]]
# id = "hot"
# description = "temperatures above 30"
# sql = '''
# SELECT payload.temp AS t, clientid, topic_level(2) AS site
# FROM "sensors/+/temp"
# WHERE float(payload.temp) > 30
# '''
#
# [[rule.action]]
# type = "republish"            # republish | webhook | mqtt | kafka
# topic = "alerts/${site}"
# qos = 1
#
# [[rule.action]]
# type = "webhook"
# url = "https://hooks.example.com/orbitmq"
# body = '{"device":"${clientid}","temp":${t}}'
# dead_letter_topic = "rules/dead/hot"
#
# [[rule.action]]
# type = "kafka"
# connector = "events"
# topic = "hot-sensors"
# key = "${clientid}"
#
# [[rule.action]]
# type = "mqtt"
# connector = "cloud"
# topic = "edge-1/alerts/${site}"
# qos = 1

# Connectors used by mqtt and kafka actions; changed only in this file (restart to apply).
# [[connector]]
# name = "events"
# kind = "kafka"
# bootstrap = ["kafka-1:9093", "kafka-2:9093"]
# tls = { ca_file = "/etc/orbitmq/kafka-ca.pem" }
# sasl = { mechanism = "scram-sha-512", username = "orbitmq", password = { env = "KAFKA_PASSWORD" } }
#
# [[connector]]
# name = "cloud"
# kind = "mqtt"
# address = "mqtt.example.com:8883"
# tls = {}
# client_id = "edge-1"
# username = "edge"
# password = { file = "/run/secrets/cloud" }

On this page