RabbitMQ protocols are TCP-based and assume long-lived connections for efficiency — a connection is not opened per protocol operation, and one client library connection uses a single TCP connection. Applications must close connections when they are no longer needed, and a consistently high rate of newly opened connections — connection churn — risks resource exhaustion; RabbitMQ collects churn metrics and exposes them via Prometheus and the management UI. AMQP 0-9-1 connections are multiplexed with channels, lightweight connections that share a single TCP connection; every protocol operation happens on a channel, and a channel exists only within a connection, so closing a connection closes all its channels. For multi-threaded or multi-process applications, open a new channel per thread or process rather than sharing channels between them, and close channels when they are no longer needed because operations on a closed channel fail. The maximum number of channels per connection, channel_max, is negotiated between client and server at connection time and the lower configured value wins; exceeding it closes the connection with an error. Some client libraries provide automatic recovery from network failures; others leave recovery to the application. Scope: RabbitMQ. Reviewed October 4, 2026.
Long-lived connections and multiplexed channels
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- www.rabbitmq.com
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.