RabbitMQ

RabbitMQ is an open-source message broker that sits between the parts of a system that produce work and the parts that do it. A producer publishes a message to an exchange, the exchange matches the message's routing key against its bindings, and every matching queue holds the message until a consumer takes it. That indirection is the point: producers never need to know who consumes their messages, and a queue absorbs bursts that would otherwise overwhelm a downstream service.

Why RabbitMQ?

  • Durable buffering: A queue holds work while consumers are slow, restarting, or offline, so a traffic spike becomes a backlog to work through rather than dropped requests.
  • Flexible routing: Direct exchanges route on an exact key, topic exchanges on wildcard patterns like orders.*, fanout exchanges to every bound queue, and headers exchanges on message metadata.
  • Delivery guarantees: Messages and queues can be marked durable so they survive a broker restart, and unacknowledged messages return to the queue when a consumer dies mid-work.
  • Failure handling built in: Dead-letter exchanges, per-message TTLs, and queue length limits let you decide up front what happens to work that expires, overflows, or repeatedly fails.
  • Runs anywhere: Self-hosted on your own infrastructure, or managed through providers such as CloudAMQP and Amazon MQ.

Using RabbitMQ in Sim

Sim talks to RabbitMQ over its Management HTTP API — the same interface behind the RabbitMQ management UI — using the management plugin's base URL plus a username and password. There is no AMQP connection to configure and no client library to install; if you can reach the management UI in a browser, Sim can reach your broker.

Key benefits of using RabbitMQ in Sim:

  • Publish from any workflow step: Hand off enriched or classified data to an existing service by publishing to an exchange, without that service needing to know Sim exists.
  • Inspect queues without consuming them: The default acknowledgement mode requeues what it reads, so an agent can examine a dead-letter backlog and leave the messages exactly where they were.
  • Triage failures with an agent: Read a dead-letter queue, let an agent group messages by root cause, and route the summary to Slack, PagerDuty, or a table.
  • Monitor broker health on a schedule: List queues and read the broker overview to catch a queue whose depth is climbing or that has lost all its consumers.
  • Declare topology as part of a workflow: Create queues, set arguments such as quorum type or dead-lettering, and bind them to exchanges as an automated setup step.

Before you start

  • The management plugin must be enabled and reachable from Sim. It listens on port 15672 by default and is separate from the AMQP port (5672). Self-hosted brokers enable it with rabbitmq-plugins enable rabbitmq_management; managed providers expose it as a management or console URL.
  • The management URL must use https unless the broker is on a loopback host. Credentials travel on every request as HTTP basic auth, so plain http to a remote broker would put them on the wire in the clear — Sim rejects it rather than sending them.
  • The user you authenticate as needs the management tag at minimum, plus read and write permissions on the virtual host you target. Administrative operations require broader permissions.
  • Publishing and reading messages over the HTTP API is convenient but not a high-throughput transport — RabbitMQ opens a new connection per request. It is well suited to workflow-rate traffic, inspection, and operational automation; a service consuming thousands of messages per second should use an AMQP client instead.
  • Queue statistics such as message and consumer counts are collected on an interval, so a queue declared moments ago may report them as empty until the broker's next sample.
  • Reading messages is bounded per call so one retrieval cannot exceed Sim's response limit. A batch is capped at 50 messages, payloads are truncated (each message reports whether it was), and a large batch shortens payloads further. AMQP properties and headers are returned in full — the broker offers no way to truncate them — so retrieving several messages carrying very large headers may still hit the limit; lower the count if that happens.

Usage Instructions

Connect agents to a RabbitMQ broker through its Management HTTP API. Publish messages to exchanges, read messages off queues, declare queues, exchanges, bindings, and policies, and inspect broker health, queue depth, consumers, connections, and cluster nodes. Works with self-hosted brokers and managed offerings such as CloudAMQP as long as the management plugin is reachable.

Actions

RabbitMQ Publish Message

Publish a message to a RabbitMQ exchange with a routing key. Reports whether the message was routed to at least one queue.

Input

ParameterTypeRequiredDescription
exchangestringNoExchange to publish to. Leave empty to publish to the default exchange, which routes by queue name. Empty is a valid value, so this is not required.
routingKeystringYesRouting key. When publishing to the default exchange this is the target queue name.
payloadstringYesMessage body to publish
payloadEncodingstringNoHow the payload is encoded: string (default) or base64
propertiesstringNoAMQP basic properties as a JSON object, e.g. {"delivery_mode":2,"content_type":"application/json"}
headersstringNoMessage headers as a JSON object, e.g. {"source":"sim"}

Output

ParameterTypeDescription
routedbooleanWhether the message was routed to at least one queue. False means no binding matched and the message was dropped.
exchangestringExchange the message was published to
routingKeystringRouting key the message was published with

RabbitMQ Get Messages

Retrieve messages from a RabbitMQ queue. Defaults to requeueing the messages so they stay available to real consumers.

Input

ParameterTypeRequiredDescription
queuestringYesQueue to read messages from
countnumberNoMaximum number of messages to retrieve, from 1 to ${MAX_MESSAGE_COUNT}. Defaults to 1
ackmodestringNoHow retrieved messages are handled: ack_requeue_true (default, leaves messages in the queue), ack_requeue_false (removes them), reject_requeue_true, or reject_requeue_false
encodingstringNoauto (default) returns readable text where possible, base64 always returns base64
truncatenumberNoTruncate payloads longer than this many bytes. Defaults to ${DEFAULT_TRUNCATE_BYTES}, capped at ${MAX_TRUNCATE_BYTES}, and lowered further at high counts so the whole batch stays inside the response limit. Each message reports whether it was truncated

Output

ParameterTypeDescription
queueNamestringQueue the messages were read from
countnumberNumber of messages retrieved
messagesarrayRetrieved messages, empty when the queue holds nothing

RabbitMQ List Queues

List queues in a RabbitMQ virtual host with their depth, consumer count, and configuration.

Input

ParameterTypeRequiredDescription
pagenumberNoPage of results to return, starting at 1
pageSizenumberNoQueues per page, from 1 to ${RABBITMQ_MAX_PAGE_SIZE}. Defaults to ${DEFAULT_PAGE_SIZE}
namestringNoFilter queues whose name contains this value
useRegexbooleanNoTreat the name filter as a regular expression

Output

ParameterTypeDescription
queuesarrayQueues in the virtual host
countnumberNumber of queues returned on this page
totalCountnumberTotal queues in the virtual host before filtering
pagenumberPage number returned
pageCountnumberTotal number of pages

RabbitMQ Get Queue

Read a single RabbitMQ queue, including its depth, consumer count, and declaration settings.

Input

ParameterTypeRequiredDescription
queuestringYesQueue name to read

Output

ParameterTypeDescription
queueobjectThe requested queue

RabbitMQ Create Queue

Declare a RabbitMQ queue. Declaring a queue that already exists with the same settings succeeds without changing it.

Input

ParameterTypeRequiredDescription
queuestringYesName of the queue to declare
durablebooleanNoWhether the queue survives a broker restart. Defaults to true
autoDeletebooleanNoDelete the queue when its last consumer disconnects. Defaults to false
argumentsstringNoQueue arguments as a JSON object, e.g. {"x-queue-type":"quorum","x-message-ttl":60000}

Output

ParameterTypeDescription
queueNamestringName of the declared queue
vhoststringVirtual host the queue was declared in
createdbooleanWhether the declaration succeeded

RabbitMQ Delete Queue

Delete a RabbitMQ queue and every message still in it. Can be guarded so the delete only happens when the queue is unused or empty.

Input

ParameterTypeRequiredDescription
queuestringYesName of the queue to delete
ifUnusedbooleanNoOnly delete the queue when it has no consumers
ifEmptybooleanNoOnly delete the queue when it holds no messages

Output

ParameterTypeDescription
queueNamestringName of the deleted queue
vhoststringVirtual host the queue was deleted from
deletedbooleanWhether the queue was deleted

RabbitMQ Purge Queue

Discard every ready message in a RabbitMQ queue while leaving the queue itself in place.

Input

ParameterTypeRequiredDescription
queuestringYesName of the queue to purge

Output

ParameterTypeDescription
queueNamestringName of the purged queue
vhoststringVirtual host the queue belongs to
purgedbooleanWhether the queue was purged

RabbitMQ List Exchanges

List exchanges in a RabbitMQ virtual host with their type and declaration settings.

Input

ParameterTypeRequiredDescription
pagenumberNoPage of results to return, starting at 1
pageSizenumberNoExchanges per page, from 1 to ${RABBITMQ_MAX_PAGE_SIZE}. Defaults to ${DEFAULT_PAGE_SIZE}
namestringNoFilter exchanges whose name contains this value
useRegexbooleanNoTreat the name filter as a regular expression

Output

ParameterTypeDescription
exchangesarrayExchanges in the virtual host
countnumberNumber of exchanges returned on this page
totalCountnumberTotal exchanges in the virtual host before filtering
pagenumberPage number returned
pageCountnumberTotal number of pages

RabbitMQ Get Exchange

Read a single RabbitMQ exchange and the settings it was declared with.

Input

ParameterTypeRequiredDescription
exchangestringNoExchange name to read. Leave empty for the default exchange, which is a valid value, so this is not required

Output

ParameterTypeDescription
exchangeobjectThe requested exchange

RabbitMQ Create Exchange

Declare a RabbitMQ exchange. Declaring an exchange that already exists with the same settings succeeds without changing it.

Input

ParameterTypeRequiredDescription
exchangestringYesName of the exchange to declare
exchangeTypestringNoRouting behaviour: direct (exact routing key, default), topic (wildcard patterns), fanout (every bound queue), or headers (match on binding arguments)
durablebooleanNoWhether the exchange survives a broker restart. Defaults to true
autoDeletebooleanNoDelete the exchange once its last binding is removed. Defaults to false
internalbooleanNoInternal exchanges cannot be published to directly, only bound from another exchange. Defaults to false
argumentsstringNoExchange arguments as a JSON object, e.g. {"alternate-exchange":"unrouted"} to capture messages that match no binding

Output

ParameterTypeDescription
exchangeNamestringName of the declared exchange
vhoststringVirtual host the exchange was declared in
createdbooleanWhether the declaration succeeded

RabbitMQ Delete Exchange

Delete a RabbitMQ exchange and every binding attached to it. Publishers targeting it will fail afterwards.

Input

ParameterTypeRequiredDescription
exchangestringYesName of the exchange to delete
ifUnusedbooleanNoOnly delete the exchange when nothing is bound to it

Output

ParameterTypeDescription
exchangeNamestringName of the deleted exchange
vhoststringVirtual host the exchange was deleted from
deletedbooleanWhether the exchange was deleted

RabbitMQ List Bindings

List the bindings that route messages into a RabbitMQ queue, including the implicit default-exchange binding.

Input

ParameterTypeRequiredDescription
queuestringYesQueue whose bindings should be listed

Output

ParameterTypeDescription
queueNamestringQueue the bindings route into
bindingsarrayBindings targeting the queue. The entry with an empty source is the implicit default-exchange binding
countnumberNumber of bindings returned

RabbitMQ List Exchange Bindings

List everything an exchange routes to, so you can see which routing keys reach which queues.

Input

ParameterTypeRequiredDescription
exchangestringNoExchange whose outgoing bindings should be listed. Leave empty for the default exchange, which is a valid value, so this is not required

Output

ParameterTypeDescription
exchangeNamestringExchange the bindings originate from
bindingsarrayBindings routing out of the exchange. An empty list means nothing it publishes can be delivered
countnumberNumber of bindings returned

RabbitMQ Create Binding

Bind a queue or another exchange to a RabbitMQ exchange so messages matching a routing key are routed to it.

Input

ParameterTypeRequiredDescription
exchangestringYesSource exchange to bind from
queuestringYesDestination queue, or destination exchange when binding exchange to exchange
destinationTypestringNoWhether the destination is a queue (default) or an exchange. Exchange-to-exchange bindings chain routing between exchanges
routingKeystringNoRouting key the binding matches. Topic exchanges accept wildcards such as orders.*
argumentsstringNoBinding arguments as a JSON object. Headers exchanges match on these, e.g. {"x-match":"all","type":"invoice"}

Output

ParameterTypeDescription
exchangestringSource exchange the binding reads from
queueNamestringDestination queue the binding routes into
routingKeystringRouting key the binding matches
propertiesKeystringBroker identifier addressing the new binding
createdbooleanWhether the binding was created

RabbitMQ Delete Binding

Remove a binding so an exchange stops routing its matching messages to that destination.

Input

ParameterTypeRequiredDescription
exchangestringYesSource exchange the binding reads from
destinationstringYesDestination queue or exchange the binding routes to
destinationTypestringNoWhether the destination is a queue (default) or an exchange
propertiesKeystringYesBroker identifier for the binding, taken from List Bindings or Create Binding. It is the routing key for a simple binding, ~ for an empty routing key, and a hashed value when the binding has arguments

Output

ParameterTypeDescription
exchangestringSource exchange the binding read from
destinationstringDestination the binding routed to
propertiesKeystringBroker identifier of the deleted binding
deletedbooleanWhether the binding was deleted

RabbitMQ Get Overview

Read broker-wide RabbitMQ status: version, cluster name, object totals, queue depth totals, and message rates.

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
rabbitmqVersionstringRabbitMQ version running on the node
productNamestringBroker product name
productVersionstringBroker product version
erlangVersionstringErlang runtime version
clusterNamestringName of the cluster
nodestringNode that served the request
objectTotalsobjectCounts of brokers objects
connectionsnumberOpen connections
channelsnumberOpen channels
exchangesnumberDeclared exchanges
queuesnumberDeclared queues
consumersnumberRegistered consumers
queueTotalsobjectAggregate queue depth across the broker
messagesnumberTotal messages across all queues
messages_readynumberMessages ready for delivery
messages_unacknowledgednumberDelivered but unacknowledged messages
messageStatsjsonBroker-wide message counters and rates, e.g. publish and confirm totals

RabbitMQ Health Check

Run one of the broker health checks and report whether it passed. A failing check is a normal result, not a tool error.

Input

ParameterTypeRequiredDescription
checkstringNoWhich check to run: alarms (cluster-wide resource alarms, default), local-alarms, virtual-hosts, node-is-quorum-critical, port-listener, protocol-listener, or certificate-expiration
portnumberNoPort to verify a listener on. Required for the port-listener check
protocolstringNoProtocol to verify a listener for, e.g. amqp, amqp/ssl, mqtt, stomp, or http. Required for the protocol-listener check
withinnumberNoHow far ahead to look for expiring certificates. Required for the certificate-expiration check
unitstringNoUnit for the certificate-expiration window: days, weeks, months (default), or years

Output

ParameterTypeDescription
checkstringThe health check that was run
healthybooleanTrue when the check reported status ok
statusstringRaw status reported by the broker: ok or failed
reasonstringExplanation the broker gave, present on failures and on some passes
detailsjsonFull check body, including check-specific fields such as the ports or protocols found

RabbitMQ List Nodes

List the cluster nodes with memory, disk, file-descriptor, and alarm state. A fired alarm blocks publishers broker-wide.

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
nodesarrayCluster nodes and their resource headroom
countnumberNumber of nodes in the cluster

RabbitMQ List Virtual Hosts

List the virtual hosts on the broker with their message totals, so you can discover which scopes exist.

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
vhostsarrayVirtual hosts the authenticated user can see
countnumberNumber of virtual hosts returned

RabbitMQ List Connections

List client connections to the broker with their user, state, and channel count. Connections are cluster-wide, not scoped to one virtual host.

Input

ParameterTypeRequiredDescription
pagenumberNoPage of results to return, starting at 1
pageSizenumberNoConnections per page, from 1 to ${RABBITMQ_MAX_PAGE_SIZE}. Defaults to ${DEFAULT_PAGE_SIZE}
namestringNoFilter connections whose name contains this value
useRegexbooleanNoTreat the name filter as a regular expression

Output

ParameterTypeDescription
connectionsarrayOpen client connections
countnumberNumber of connections returned on this page
totalCountnumberTotal connections before filtering
pagenumberPage number returned
pageCountnumberTotal number of pages

RabbitMQ List Channels

List open channels with their prefetch limit and unacknowledged message count, which is where stalled consumers show up. Channels are cluster-wide, not scoped to one virtual host.

Input

ParameterTypeRequiredDescription
pagenumberNoPage of results to return, starting at 1
pageSizenumberNoChannels per page, from 1 to ${RABBITMQ_MAX_PAGE_SIZE}. Defaults to ${DEFAULT_PAGE_SIZE}
namestringNoFilter channels whose name contains this value
useRegexbooleanNoTreat the name filter as a regular expression

Output

ParameterTypeDescription
channelsarrayOpen channels
countnumberNumber of channels returned on this page
totalCountnumberTotal channels before filtering
pagenumberPage number returned
pageCountnumberTotal number of pages

RabbitMQ List Consumers

List the consumers subscribed in a virtual host. An empty result for a queue with a backlog means nothing is processing it.

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
consumersarrayConsumers currently subscribed in the virtual host
countnumberNumber of consumers returned

RabbitMQ List Policies

List the policies in a virtual host. Policies are how dead-lettering, TTLs, and length limits get applied to matching queues and exchanges.

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
policiesarrayPolicies defined in the virtual host
countnumberNumber of policies returned

RabbitMQ Create Policy

Create or replace a RabbitMQ policy, applying settings such as dead-lettering, TTLs, or length limits to every queue or exchange whose name matches a pattern.

Input

ParameterTypeRequiredDescription
policyNamestringYesName of the policy. Reusing an existing name replaces that policy
patternstringYesRegular expression matched against queue or exchange names, e.g. ^orders\. to match every name starting with orders.
definitionstringYesSettings to apply, as a JSON object, e.g. {"dead-letter-exchange":"dlx","message-ttl":86400000,"max-length":10000}
prioritynumberNoPriority, defaulting to 0. When several policies match a resource only the highest-priority one applies — they do not merge
applyTostringNoWhat the policy applies to: queues (default), classic_queues, quorum_queues, streams, exchanges, or all

Output

ParameterTypeDescription
policyNamestringName of the created policy
vhoststringVirtual host the policy applies in
createdbooleanWhether the policy was created or replaced

RabbitMQ Delete Policy

Delete a RabbitMQ policy. Every queue and exchange it matched immediately loses the settings it applied.

Input

ParameterTypeRequiredDescription
policyNamestringYesName of the policy to delete

Output

ParameterTypeDescription
policyNamestringName of the deleted policy
vhoststringVirtual host the policy applied in
deletedbooleanWhether the policy was deleted

On this page