Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

FireMQ needs no configuration. When you need to change something, each setting can come from three places. The first one found wins:

  1. a command-line flag, such as --amqp 6672
  2. an environment variable, such as FIREMQ_AMQP=6672
  3. the settings file, firemq.toml in the working directory or the file given with --config

firemq init writes a firemq.toml that lists every setting with its default and a comment. FireMQ rejects unknown keys in the file, so a typo fails at startup instead of being ignored.

Listeners

A listener value is host:port, a bare port (all interfaces), or off.

SettingFlagEnvironmentDefault
AMQP 0-9-1--amqpFIREMQ_AMQP0.0.0.0:5672
AMQP over TLS--amqpsFIREMQ_AMQPS0.0.0.0:5671, only with TLS
FireMQ protocol--fireFIREMQ_FIRE0.0.0.0:5673
FireMQ over TLS--firesFIREMQ_FIRES0.0.0.0:5674, only with TLS
HTTP: UI, API, metrics, WebSocket--httpFIREMQ_HTTP0.0.0.0:15672
TLS certificate chain (PEM)--tls-certFIREMQ_TLS_CERTnone
TLS private key (PEM)--tls-keyFIREMQ_TLS_KEYnone

In firemq.toml, listeners go in [listeners] and the TLS files in [tls] as cert and key.

Storage

SettingFlagEnvironment[storage] keyDefault
Data directory--data-dirFIREMQ_DATA_DIRdata_dirfiremq-data
Keep everything in memory--ephemeralFIREMQ_EPHEMERALephemeralfalse
Sync before confirming--fsyncFIREMQ_FSYNCfsynctrue

With fsync = false, a confirmed persistent message survives a broker crash but can be lost if the machine loses power. See Durability and recovery.

Limits

SettingFlagEnvironment[limits] keyDefault
Memory high watermark (fraction of RAM)--memory-high-watermarkFIREMQ_MEMORY_HIGH_WATERMARKmemory_high_watermark0.4
Absolute memory limit--memory-limitFIREMQ_MEMORY_LIMITmemory_limitnone
Free disk space limit--disk-free-limitFIREMQ_DISK_FREE_LIMITdisk_free_limit50MB

Sizes take units: 512MB, 2GiB, 1000000. When a limit is crossed, publishers are paused; see Operations.

Users

SettingFlagEnvironment[auth] keyDefault
First user--default-userFIREMQ_DEFAULT_USERdefault_userguest
First user's password--default-passFIREMQ_DEFAULT_PASSdefault_passguest
Users limited to localhost--loopback-usersFIREMQ_LOOPBACK_USERSloopback_usersguest

The first user is created only when the broker has no users, and gets the administrator tag and full access to the / vhost. An empty FIREMQ_LOOPBACK_USERS lets every user connect from any host.

Logging

SettingFlagEnvironment[log] keyDefault
Level or filter--log-levelFIREMQ_LOGlevelinfo
Format: text or json--log-formatFIREMQ_LOG_FORMATformattext

The level also accepts per-module filters, for example info,firemq_amqp=debug.

Development mode

firemq --dev is shorthand for an in-memory broker that accepts guest from any host and logs at debug level. Use it in containers for local development and in CI.