Repository navigation
v2.11.0
This release adds the x-mqtt-topic exchange type, automatic retries with backoff for rejected messages, and the tcp_send_timeout, tls_ciphersuites and syncfs_threshold config options. The management UI charts are redrawn on uPlot, and a refresh control in the header pauses, resumes and paces auto-refresh. Publish confirms sync only the affected files, message store segments are cached in page-sized folios and connections share pooled socket buffers, lowering write amplification and memory usage. Message TTL expiry gets millisecond precision and tcp_nodelay defaults to true. It also fixes many races around policies, consumers, dead-lettering and message store segments that could corrupt state or crash the broker. Federation links and their upstream resources now survive policy re-applies, publishes over the HTTP API and MQTT respect the disk alarm, and the MQTT retain store no longer mixes up non-ASCII topics or keeps an open file per topic.
Release Highlights
Automatic Retries with Backoff
A queue can now delay rejected messages and redeliver them after a growing delay. This replaces the manual pattern of chained queues with TTLs and dead letter exchanges.
Declare the queue with x-delayed-retry-min to enable the feature. A message rejected with requeue=true then waits in an internal retry queue (amq.retry-<queue>) before the broker redelivers it.
x-delayed-retry-minsets the delay before the first retry, in millisecondsx-delayed-retry-multipliersets the backoff shape: omit it for linear,1for constant,2or more for exponentialx-delayed-retry-maxcaps a single retry delayx-delivery-limit, or adelivery-limitpolicy, ends the retries and dead-letters the message
Without a delivery limit, a message that always fails retries forever. Set a limit and a dead letter exchange to move such a message aside. See automatic-retries.md for the full behavior. #1815 #2603
Consume MQTT Messages over AMQP
The new x-mqtt-topic exchange type makes MQTT publishes available to AMQP consumers. Declare an exchange of this type, then bind queues or exchanges to it with MQTT topic filters as binding keys. The MQTT topic is the routing key, unchanged.
The exchange is always internal, and it refuses malformed filters at bind time. It carries all MQTT traffic in the vhost, so a declare also needs read permission on mqtt.default. MQTT topic permissions do not apply to AMQP destinations, so grant read permission on the exchange with care. See mqtt.md. #2346 #2667
Lower Write Amplification and Memory Usage
- Publish confirms sync only the segments that hold the confirmed messages, plus the directories of new files. Before, each confirm ran a
syncfsof the whole data dir, which also flushed unrelated traffic on other queues.tx.commitstill usessyncfs#2296 - The kernel caches message store segments and ack files in page-sized folios. Each sync for a publish confirm or an MQTT QoS 1 publish writes about 4 KiB instead of up to 128 KiB #2323 #2341 #2476
- Client connections share per-thread pools of socket read and write buffers. An idle connection no longer holds a read buffer, which lowers memory usage with many connections #2343
tcp_nodelaydefaults totrue. This removes up to ~40 ms of latency on deliveries to consumers that ack in batches #2336
Management UI: New Charts and a Refresh Control
The charts are redrawn on uPlot instead of Chart.js. The legend is a table under the plot, and a hover on one chart moves the cursor on every chart on the page. The nodes page gets a Disk usage chart with capacity lines. #2448
A refresh control in the header pauses and resumes auto-refresh, and sets the refresh rate to 5, 10, 30 or 60 seconds. It also shows when the UI cannot reach the server. #2389 #2390 #2391 #2417
Changes Worth Mentioning
tcp_send_timeoutconfig option in[main](default15seconds): the broker disconnects a client that doesn't read what the server sends for that long. Previously such a write blocked forever #2363tls_ciphersuitesconfig option to select the allowed TLS 1.3 ciphersuites, whichtls_ciphersdoes not cover #2243syncfs_thresholdconfig option in[main](default64): a sync batch that touches more files than this falls back to onesyncfsof the data dir #2296- Message timestamps and message TTL expiry have millisecond precision. They were previously rounded down to 100 ms #2344
- Statically linked Linux binaries (amd64, arm64) are attached to each GitHub release #2478
- Prometheus metrics
global_messages_dead_lettered_{delivery_limit,expired,maxlen,rejected}_totalwith adead_letter_strategylabel #2413 LavinMQ-Stats-Intervalheader on every HTTP API response, with the configured stats interval in milliseconds #2447- The HTTP API docs at
/docs/match the management UI, with the same fonts, colors and theme switcher #2526 - RPM packages are built for Fedora 45 #2739
Breaking Changes / Upgrade Notes
tcp_nodelay defaults to true
Nagle's algorithm is now off for client connections, and the setting also applies to the HTTP listeners.
tcp_nodelay = true can lower the throughput of MQTT QoS 0 traffic. Set tcp_nodelay = false in [main] to get the old behaviour and the old throughput. #2336 #2494
Publishes during a disk alarm are refused
During a disk alarm, a publish over the HTTP API now gets 412. An MQTT connection that publishes is closed, as MQTT 3.1.1 can't refuse a single publish. Last will messages aren't published during the alarm either. #2510
MQTT QoS 1 throughput is lower
The broker sends a QoS 1 PUBACK once the publish is persisted to disk, in publish order. QoS 1 throughput is lower as a result. #2296
MQTT topic filter matching follows the spec
- A subscription to
a/#now also gets messages, and the retained message, on the parent topica - Filters that start with
#or+no longer match topics that start with$, such as$SYS/.... Subscribe to a filter that starts with the$level to get these messages - A publish with a topic longer than 255 bytes closes the connection. A topic filter that long gets SUBACK Failure
TLS settings in [sni:host] sections
tls_min_version, tls_ciphers, tls_ciphersuites and tls_prefer_server_ciphers are no longer supported in [sni:host] sections, and log a warning. The listener's settings apply to every SNI host.
- A per-host
tls_ciphersused to apply to TLS 1.2 connections. Move a stricter per-host cipher list to[main] - When a TLS listener is configured, an unreadable certificate in an SNI section now stops startup with an error. A reload with one is refused
Internal queues are protected from AMQP clients
Passive declare, delete, purge, consume, basic get, bind and unbind on an internal queue, e.g. a delayed exchange queue, are refused with ACCESS_REFUSED. Internal queues are no longer included in definitions exports. They remain visible through the HTTP API. #2252 #2727
Stricter AMQP behavior
- A mandatory publish that a queue rejects, on
overflow=reject-publishor while the queue closes, no longer gets abasic.return. With publisher confirms it is only nacked #2586 - An exclusive consumer is refused with
ACCESS_REFUSEDwhen the queue already has non-exclusive consumers #2327
Startup and packaging
- LavinMQ now exits at startup if another process holds the data directory lock. Previously it waited for the lock #2350
- No Debian packages are built for Debian 11, which is past end of LTS #2464
- Followers sync the same files as the leader before they ack (replication protocol v2). Peers on protocol v1 remain compatible #2296
For the full list of changes, see the changelog.