KubeMQ
ConnectorsRabbitMQ (AMQP 0-9-1)Concepts

Configuration

How the KubeMQ RabbitMQ (AMQP 0-9-1) connector is configured — enable/disable, TLS, and the availability-first startup model.

The RabbitMQ (AMQP 0-9-1) connector is configured server-side under the Connectors.Amqp block of the KubeMQ server config, exposed as twelve CONNECTORS_AMQP_* environment variables. The connector is opt-in (disabled by default) — you must explicitly enable it. It ships with sensible production defaults, so once enabled no other env var is required.

The only thing clients configure is the broker endpoint via the KUBEMQ_AMQP_URL environment variable (default amqp://guest:guest@localhost:5672/); the URL scheme selects the transport (amqp:// plain, amqps:// TLS). Everything below is broker-side server configuration.

Enable / disable

Enable the connector with its enable variable:

docker run -d \  --name kubemq \  -p 5672:5672 \  -p 5671:5671 \  -p 50000:50000 \  -e KUBEMQ_TOKEN=YOUR_LICENSE_KEY \  -e CONNECTORS_AMQP_ENABLE=true \  europe-docker.pkg.dev/kubemq/images/kubemq:next

To turn it off again:

docker run -d -p 50000:50000 -e KUBEMQ_TOKEN=YOUR_LICENSE_KEY -e CONNECTORS_AMQP_ENABLE=false europe-docker.pkg.dev/kubemq/images/kubemq:next

The enable variable is CONNECTORS_AMQP_ENABLE — spell it verbatim. This is the AMQP 0-9-1 (RabbitMQ) connector; it is distinct from the AMQP 1.0 connector, whose flag is CONNECTORS_AMQP10_ENABLE. The two share ports 5672/5671 through the internal amqpmux, but each has its own enable flag — disabling one leaves the other reachable. Alternatively, disable just one listener with CONNECTORS_AMQP_PORT=0 (plain) or CONNECTORS_AMQP_TLS_PORT=0 (TLS); setting both to 0 also disables the connector. When Enable is false, no AMQP listener binds and the rest of this config is skipped.

Field notes

  • Port / TlsPort — when Enable=true, at least one of Port or TlsPort must be non-zero, otherwise the server reports bad AMQP configuration: Enable=true requires Port or TlsPort. The plain listener is amqp://host:5672/; the TLS listener is amqps://host:5671/.
  • MaxConnections0 means unlimited; over-limit connections are accepted then closed with code 320.
  • DefaultVhost — the segment AMQP vhost / maps to. The default literal is "default" (a reserved vhost), not /. The channel mapping is amqp.{vhost}.{queue}. Reach the default vhost by connecting to /; connecting directly to a vhost literally named default is rejected. See the reserved-vhost callout in the configuration reference.
  • GetBatchSize — bounds per-basic.get pulls (default 32).
  • DeadLetterMaxHops — the dead-letter cycle cap per (queue, reason); default 16.
  • MaxReceiveCount — the poison-message receive cap; 0 inherits the broker default.

TLS

TLS has no AMQP-specific configuration. TLS/AMQPS on port 5671 is managed by the server-global Security block, shared with gRPC and REST. The TLS listener is active only when that block is configured (Mode ≠ None); TLS 1.2+ is enforced and mTLS is supported. Connecting over TLS is purely a transport swap (KUBEMQ_AMQP_URL=amqps://host:5671/); the AMQP frames on top are identical. See TLS and mTLS and Auth & security.

Configuring the connector

The same settings can be supplied through a TOML config file, environment variables, or docker run flags. Each environment variable uses the CONNECTORS_AMQP_ prefix.

config.toml
[Connectors.Amqp]
  Enable = true
  Port = 5672
  TlsPort = 5671
  HeartbeatSeconds = 60
  FrameMax = 131072
  ChannelMax = 2047
  MaxConnections = 1000
  MaxBodySize = 104857600
  DefaultVhost = "default"
  GetBatchSize = 32
  DeadLetterMaxHops = 16
  MaxReceiveCount = 0
rabbitmq.env
CONNECTORS_AMQP_ENABLE=true
CONNECTORS_AMQP_PORT=5672
CONNECTORS_AMQP_TLS_PORT=5671
CONNECTORS_AMQP_HEARTBEAT_SECONDS=60
CONNECTORS_AMQP_FRAME_MAX=131072
CONNECTORS_AMQP_CHANNEL_MAX=2047
CONNECTORS_AMQP_MAX_CONNECTIONS=1000
CONNECTORS_AMQP_MAX_BODY_SIZE=104857600
CONNECTORS_AMQP_DEFAULT_VHOST=default
CONNECTORS_AMQP_GET_BATCH_SIZE=32
CONNECTORS_AMQP_DEAD_LETTER_MAX_HOPS=16
CONNECTORS_AMQP_MAX_RECEIVE_COUNT=0
docker run -d \  --name kubemq \  -p 5672:5672 \  -p 5671:5671 \  -p 50000:50000 \  -e KUBEMQ_TOKEN=YOUR_LICENSE_KEY \  -e CONNECTORS_AMQP_ENABLE=true \  -e CONNECTORS_AMQP_MAX_CONNECTIONS=5000 \  -e CONNECTORS_AMQP_FRAME_MAX=262144 \  europe-docker.pkg.dev/kubemq/images/kubemq:next

The Docker example includes CONNECTORS_AMQP_ENABLE=true — without it the connector stays disabled and port 5672 is not bound. Set CONNECTORS_AMQP_ENABLE=false when you want to turn the connector off, or CONNECTORS_AMQP_PORT=0 to drop the plain listener and serve AMQPS only.

Availability-first startup. Unlike gRPC, the AMQP connector starts non-fatally: if the listener cannot bind or the topology store is corrupt, the server logs error loading amqp connector, continuing without AMQP and keeps running. After an upgrade or config change, verify the connector came up — look for the AMQP connector started log line or check the dashboard AMQP page / GET /api/amqp/connections. See Connections endpoint.

Was this page helpful?

On this page