RabbitMQ

App · Databases · 20 actions

Publish and read RabbitMQ messages, create, purge and delete queues and exchanges, bind them together, and check the broker's health, through the management API of your own broker or CloudAMQP.

Actions

ActionWhat it does
Bind exchange to exchangeRoute messages from one exchange on to another.
Bind queue to exchangeRoute messages from an exchange to a queue.
Check alarmsWhether a memory or disk alarm is in effect anywhere in the cluster.
Create exchangeCreate an exchange.
Create queueCreate a durable queue.
Delete bindingRemove one binding from an exchange to a queue or exchange, identified by its properties key.
Delete exchangeDelete an exchange and its bindings.
Delete queueDelete a queue and any messages in it.
Get current userThe RabbitMQ user this connection signs in as, with its tags.
Get exchangeOne exchange's type, settings and arguments.
Get messagesRead messages from the front of a queue - either peeking and putting them back, or taking them off the queue.
Get overviewThe broker at a glance: cluster name, RabbitMQ and Erlang versions, the exchange types it supports, and totals of queued messages, queues, exchanges, connections and consumers.
Get queueOne queue in full: type, settings, how many messages are ready and unacknowledged, its consumers and the policy in effect.
List consumersThe consumers subscribed in a virtual host, optionally only one queue's, with their prefetch and acknowledgement settings.
List exchangesThe exchanges in a virtual host, sorted by name, with each one's type and settings.
List queue bindingsEvery binding that delivers to a queue: the source exchange, routing key and arguments, and the properties key needed to delete it.
List queuesThe queues in a virtual host, sorted by name, with each one's type, state and message and consumer counts.
List virtual hostsThe virtual hosts this user has permissions on, with their descriptions, default queue type and message counts.
Publish messagePublish a message to an exchange, or straight to a queue by leaving the exchange empty and putting the queue's name in Routing key.
Purge queueDelete every ready message in a queue, keeping the queue.

Bind exchange to exchange

Route messages from one exchange on to another. Returns the binding, including the properties key needed to delete it.

Inputs

Source exchangeexchangetextRequired
The exchange messages come from.
Destination exchangedestination_exchangetextRequired
The exchange to pass them on to.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Routing keyrouting_keytext
The routing key the binding matches. For a topic exchange use * for one word and # for any number, such as orders.*. Leave empty for none (fanout exchanges ignore it).
Argumentsargumentsobject
Optional binding arguments. For a headers exchange, the headers to match plus x-match set to all or any.

Outputs

argumentsobject
Binding arguments
destinationtext
Destination queue or exchange
destination_typetext
queue or exchange
properties_keytext
The binding's id, used to delete it
routing_keytext
Routing key
sourcetext
Source exchange (empty for the default exchange)
vhosttext
Virtual host
Example output
{
  "arguments": {},
  "destination": "orders.audit",
  "destination_type": "exchange",
  "properties_key": "orders.created",
  "routing_key": "orders.created",
  "source": "orders.events",
  "vhost": "/"
}

Bind queue to exchange

Route messages from an exchange to a queue. Returns the binding, including the properties key needed to delete it.

Inputs

ExchangeexchangetextRequired
The exchange messages come from.
QueuequeuetextRequired
The queue to deliver them to.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Routing keyrouting_keytext
The routing key the binding matches. For a topic exchange use * for one word and # for any number, such as orders.*. Leave empty for none (fanout exchanges ignore it).
Argumentsargumentsobject
Optional binding arguments. For a headers exchange, the headers to match plus x-match set to all or any.

Outputs

argumentsobject
Binding arguments
destinationtext
Destination queue or exchange
destination_typetext
queue or exchange
properties_keytext
The binding's id, used to delete it
routing_keytext
Routing key
sourcetext
Source exchange (empty for the default exchange)
vhosttext
Virtual host
Example output
{
  "arguments": {},
  "destination": "orders",
  "destination_type": "queue",
  "properties_key": "orders.created",
  "routing_key": "orders.created",
  "source": "orders.events",
  "vhost": "/"
}

Check alarms

Whether a memory or disk alarm is in effect anywhere in the cluster. While one is, RabbitMQ blocks publishers. Returns healthy true or false rather than failing the step.

Inputs

None.

Outputs

alarmslist
healthytrue/false
True when no alarm is in effect
reasontext
Why the check failed, if it did
statustext
ok or failed
Example output
{
  "alarms": [],
  "healthy": true,
  "reason": null,
  "status": "ok"
}

Create exchange

Create an exchange. If an identical one already exists nothing changes; one with different settings is an error. Returns the exchange.

Inputs

Exchange nameexchangetextRequired
Up to 255 characters. Names starting with amq. are reserved.
Typeexchange_typetextRequired
How the exchange routes messages to queues.One of: direct (Direct - route by exact routing key), fanout (Fanout - copy to every bound queue), topic (Topic - route by routing key pattern), headers (Headers - route by message headers). Default: direct.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Durabledurabletrue/false
Keep the exchange when the broker restarts.Default: true.
Delete when the last binding is removedauto_deletetrue/false
Delete the exchange once it has had a binding and the last one is removed.Default: false.
Internalinternaltrue/false
Only other exchanges can route to it; clients cannot publish to it directly.Default: false.
Alternate exchangealternate_exchangetext
Where to send messages this exchange cannot route, instead of dropping them.
Other argumentsargumentsobject
Any other exchange arguments.

Outputs

argumentsobject
Exchange arguments
auto_deletetrue/false
Deleted when its last binding is removed
createdtrue/false
False when an identical exchange already existed
durabletrue/false
Survives a broker restart
internaltrue/false
Only other exchanges can publish to it
nametext
Exchange name (empty for the default exchange)
policytext
Policy applied, if any
typetext
direct, fanout, topic or headers
vhosttext
Virtual host
Example output
{
  "arguments": {},
  "auto_delete": false,
  "created": true,
  "durable": true,
  "internal": false,
  "name": "orders.events",
  "type": "topic",
  "vhost": "/"
}

Create queue

Create a durable queue. If an identical queue already exists nothing changes; one with different settings is an error. Returns the queue.

Inputs

Queue namequeuetextRequired
Up to 255 characters, such as orders.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Queue typequeue_typetext
Leave unset to use the virtual host's default. Quorum queues are replicated across nodes; streams keep messages after they are read.One of: classic, quorum (Quorum (replicated)), stream.
Delete when the last consumer leavesauto_deletetrue/false
Delete the queue once it has had a consumer and the last one disconnects. Classic queues only.Default: false.
Message time to live (seconds)message_ttl_secondsnumber
Discard messages that have waited this long. Leave empty to keep them until read.At least 0.001.
Delete when unused for (seconds)expires_secondsnumber
Delete the queue after it has had no consumers and no reads for this long. Good for temporary queues.At least 0.001.
Maximum messagesmax_lengthnumber
Once the queue holds this many, the oldest are dropped (or dead-lettered). Leave empty for no limit.At least 0.
Dead-letter exchangedead_letter_exchangetext
Exchange that receives messages that expire, are dropped for length or are rejected without requeue.
Dead-letter routing keydead_letter_routing_keytext
Routing key for dead-lettered messages. Leave empty to keep each message's own.
Other argumentsargumentsobject
Any other queue arguments, such as x-max-priority. The fields above take precedence.

Outputs

argumentsobject
Queue arguments such as x-queue-type
auto_deletetrue/false
Deleted when its last consumer leaves
consumersnumber
Number of consumers
createdtrue/false
False when an identical queue already existed
durabletrue/false
Survives a broker restart
effective_policy_definitionobject
The policy settings in effect
exclusivetrue/false
Owned by one connection
messagesnumber
Messages in the queue (ready + unacknowledged)
messages_readynumber
Messages ready for delivery
messages_unacknowledgednumber
Messages delivered but not acknowledged
nametext
Queue name
nodetext
Node hosting the queue
policytext
Policy applied, if any
statetext
running, idle, ...
typetext
classic, quorum or stream
vhosttext
Virtual host
Example output
{
  "arguments": {
    "x-queue-type": "classic"
  },
  "auto_delete": false,
  "consumers": 1,
  "created": true,
  "durable": true,
  "effective_policy_definition": {},
  "exclusive": false,
  "messages": 0,
  "messages_ready": 3,
  "messages_unacknowledged": 0,
  "name": "orders",
  "node": "rabbit@rabbit-1",
  "policy": null,
  "state": "running",
  "type": "classic",
  "vhost": "/"
}

Delete binding

Remove one binding from an exchange to a queue or exchange, identified by its properties key.

Inputs

Source exchangeexchangetextRequired
The exchange the binding routes from.
Bound to adestination_typetext
Whether the binding delivers to a queue or exchange.One of: queue, exchange. Default: queue.
DestinationdestinationtextRequired
The queue or exchange the binding delivers to.
Properties keyproperties_keytext
The binding's properties_key, from a Bind step or List queue bindings. Leave empty for a binding with no routing key and no arguments.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).

Outputs

deletedtrue/false
Always true
destinationtext
Destination
destination_typetext
queue or exchange
properties_keytext
The binding's id
sourcetext
Source exchange
vhosttext
Virtual host
Example output
{
  "deleted": true,
  "destination": "orders",
  "destination_type": "queue",
  "properties_key": "orders.created",
  "source": "orders.events",
  "vhost": "/"
}

Delete exchange

Delete an exchange and its bindings. Optionally only if nothing is bound to it.

Inputs

ExchangeexchangetextRequired
The exchange's name, exactly as it appears in List exchanges.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Only if unusedif_unusedtrue/false
Fail instead of deleting an exchange with bindings.Default: false.

Outputs

deletedtrue/false
Always true
exchangetext
Exchange
vhosttext
Vhost
Example output
{
  "deleted": true,
  "exchange": "orders.events",
  "vhost": "/"
}

Delete queue

Delete a queue and any messages in it. Optionally only if it is empty or has no consumers.

Inputs

QueuequeuetextRequired
The queue's name, exactly as it appears in List queues.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Only if emptyif_emptytrue/false
Fail instead of deleting a queue with messages.Default: false.
Only if it has no consumersif_unusedtrue/false
Fail instead of deleting a queue being consumed.Default: false.

Outputs

deletedtrue/false
Always true
queuetext
Queue
vhosttext
Vhost
Example output
{
  "deleted": true,
  "queue": "orders",
  "vhost": "/"
}

Get current user

The RabbitMQ user this connection signs in as, with its tags. Useful to check the connection works.

Inputs

None.

Outputs

is_internal_usertrue/false
Whether RabbitMQ's own user database holds it
nametext
Username
tagslist
Example output
{
  "is_internal_user": true,
  "name": "lodol",
  "tags": [
    "management"
  ]
}

Get exchange

One exchange's type, settings and arguments.

Inputs

Exchangeexchangetext
The exchange's name. Leave empty for the default exchange.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).

Outputs

argumentsobject
Exchange arguments
auto_deletetrue/false
Deleted when its last binding is removed
durabletrue/false
Survives a broker restart
internaltrue/false
Only other exchanges can publish to it
nametext
Exchange name (empty for the default exchange)
policytext
Policy applied, if any
typetext
direct, fanout, topic or headers
vhosttext
Virtual host
Example output
{
  "arguments": {},
  "auto_delete": false,
  "durable": true,
  "internal": false,
  "name": "orders.events",
  "type": "topic",
  "vhost": "/"
}

Get messages

Read messages from the front of a queue - either peeking and putting them back, or taking them off the queue. Meant for occasional reads, not as a consumer: a peeked message comes back marked redelivered and may change position.

Inputs

QueuequeuetextRequired
The queue's name, exactly as it appears in List queues.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
How manycountnumber
Up to 100. Defaults to 1.From 1 to 100. Default: 1.
Modeackmodetext
Whether the messages stay on the queue.One of: ack_requeue_true (Peek - read and put back), ack_requeue_false (Take - read and remove from the queue), reject_requeue_true (Reject and put back), reject_requeue_false (Reject and remove (dead-letters it if the queue has a dead-letter exchange)). Default: ack_requeue_true.
Payload formatencodingtext
How each message body is returned.One of: auto (Text when possible, otherwise base64), base64 (Always base64). Default: auto.
Cut bodies at (bytes)truncatenumber
Shorten longer bodies to this many bytes.At least 1.

Outputs

countnumber
How many came back
messageslist
Example output
{
  "count": 1,
  "messages": [
    {
      "exchange": "orders.events",
      "message_count": 2,
      "payload": "{\"order_id\": 1042}",
      "payload_bytes": 18,
      "payload_encoding": "string",
      "payload_json": {
        "order_id": 1042
      },
      "properties": {
        "content_type": "application/json",
        "delivery_mode": 2
      },
      "redelivered": false,
      "routing_key": "orders.created"
    }
  ]
}

Get overview

The broker at a glance: cluster name, RabbitMQ and Erlang versions, the exchange types it supports, and totals of queued messages, queues, exchanges, connections and consumers.

Inputs

None.

Outputs

cluster_nametext
Cluster name
default_queue_typetext
Default queue type
erlang_versiontext
Erlang version
exchange_typeslist
management_versiontext
Management plugin version
message_statsobject
Message rates
object_totalsobject
product_nametext
Product name
product_versiontext
Product version
queue_totalsobject
rabbitmq_versiontext
RabbitMQ version
Example output
{
  "cluster_name": "rabbit@rabbit-1",
  "default_queue_type": "classic",
  "erlang_version": "27.3",
  "exchange_types": [
    {
      "description": "",
      "enabled": true,
      "name": "direct"
    }
  ],
  "management_version": "4.3.6",
  "object_totals": {
    "channels": 2,
    "connections": 2,
    "consumers": 1,
    "exchanges": 8,
    "queues": 1
  },
  "product_name": "RabbitMQ",
  "product_version": "4.3.6",
  "queue_totals": {
    "messages": 3,
    "messages_ready": 3,
    "messages_unacknowledged": 0
  },
  "rabbitmq_version": "4.3.6"
}

Get queue

One queue in full: type, settings, how many messages are ready and unacknowledged, its consumers and the policy in effect.

Inputs

QueuequeuetextRequired
The queue's name, exactly as it appears in List queues.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).

Outputs

argumentsobject
Queue arguments such as x-queue-type
auto_deletetrue/false
Deleted when its last consumer leaves
consumersnumber
Number of consumers
durabletrue/false
Survives a broker restart
effective_policy_definitionobject
The policy settings in effect
exclusivetrue/false
Owned by one connection
messagesnumber
Messages in the queue (ready + unacknowledged)
messages_readynumber
Messages ready for delivery
messages_unacknowledgednumber
Messages delivered but not acknowledged
nametext
Queue name
nodetext
Node hosting the queue
policytext
Policy applied, if any
statetext
running, idle, ...
typetext
classic, quorum or stream
vhosttext
Virtual host
Example output
{
  "arguments": {
    "x-queue-type": "classic"
  },
  "auto_delete": false,
  "consumers": 1,
  "durable": true,
  "effective_policy_definition": {},
  "exclusive": false,
  "messages": 3,
  "messages_ready": 3,
  "messages_unacknowledged": 0,
  "name": "orders",
  "node": "rabbit@rabbit-1",
  "policy": null,
  "state": "running",
  "type": "classic",
  "vhost": "/"
}

List consumers

The consumers subscribed in a virtual host, optionally only one queue's, with their prefetch and acknowledgement settings.

Inputs

Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Queuequeuetext
Only this queue's consumers. Leave empty for all.

Outputs

countnumber
How many came back
itemslist
The consumers
Example output
{
  "count": 1,
  "items": [
    {
      "ack_required": true,
      "active": true,
      "activity_status": "up",
      "arguments": {},
      "consumer_tag": "amq.ctag-3fJ1xQ",
      "exclusive": false,
      "prefetch_count": 10,
      "queue": {
        "name": "orders",
        "vhost": "/"
      }
    }
  ]
}

List exchanges

The exchanges in a virtual host, sorted by name, with each one's type and settings. The default exchange has an empty name.

Inputs

Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Name containsname_filtertext
Only names containing this text. Leave empty for all of them.
Treat the name as a regular expressionuse_regextrue/false
Match 'Name contains' as a regular expression instead of text.Default: false.
Pagepagenumber
Which page of results, starting at 1.From 1 to 1000000. Default: 1.
Results per pagepage_sizenumber
How many to return, 1-500. Defaults to 100.From 1 to 500. Default: 100.

Outputs

countnumber
How many came back on this page
filtered_countnumber
How many match the name filter
has_moretrue/false
Whether a later page exists
itemslist
The matching exchanges
pagenumber
This page's number
page_countnumber
How many pages match
page_sizenumber
Page size asked for
total_countnumber
How many exist in the virtual host
Example output
{
  "count": 1,
  "filtered_count": 1,
  "has_more": false,
  "items": [
    {
      "arguments": {},
      "auto_delete": false,
      "durable": true,
      "internal": false,
      "name": "orders.events",
      "type": "topic",
      "vhost": "/"
    }
  ],
  "page": 1,
  "page_count": 1,
  "page_size": 100,
  "total_count": 1
}

List queue bindings

Every binding that delivers to a queue: the source exchange, routing key and arguments, and the properties key needed to delete it.

Inputs

QueuequeuetextRequired
The queue's name, exactly as it appears in List queues.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).

Outputs

countnumber
How many came back
itemslist
The queue's bindings
Example output
{
  "count": 1,
  "items": [
    {
      "arguments": {},
      "destination": "orders",
      "destination_type": "queue",
      "properties_key": "orders.created",
      "routing_key": "orders.created",
      "source": "orders.events",
      "vhost": "/"
    }
  ]
}

List queues

The queues in a virtual host, sorted by name, with each one's type, state and message and consumer counts. Filter by part of the name.

Inputs

Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Name containsname_filtertext
Only names containing this text. Leave empty for all of them.
Treat the name as a regular expressionuse_regextrue/false
Match 'Name contains' as a regular expression instead of text.Default: false.
Pagepagenumber
Which page of results, starting at 1.From 1 to 1000000. Default: 1.
Results per pagepage_sizenumber
How many to return, 1-500. Defaults to 100.From 1 to 500. Default: 100.

Outputs

countnumber
How many came back on this page
filtered_countnumber
How many match the name filter
has_moretrue/false
Whether a later page exists
itemslist
The matching queues
pagenumber
This page's number
page_countnumber
How many pages match
page_sizenumber
Page size asked for
total_countnumber
How many exist in the virtual host
Example output
{
  "count": 1,
  "filtered_count": 1,
  "has_more": false,
  "items": [
    {
      "arguments": {
        "x-queue-type": "classic"
      },
      "auto_delete": false,
      "consumers": 1,
      "durable": true,
      "effective_policy_definition": {},
      "exclusive": false,
      "messages": 3,
      "messages_ready": 3,
      "messages_unacknowledged": 0,
      "name": "orders",
      "node": "rabbit@rabbit-1",
      "policy": null,
      "state": "running",
      "type": "classic",
      "vhost": "/"
    }
  ],
  "page": 1,
  "page_count": 1,
  "page_size": 100,
  "total_count": 1
}

List virtual hosts

The virtual hosts this user has permissions on, with their descriptions, default queue type and message counts.

Inputs

None.

Outputs

countnumber
How many came back
itemslist
The virtual hosts
Example output
{
  "count": 1,
  "items": [
    {
      "default_queue_type": "classic",
      "description": "Default virtual host",
      "messages": 3,
      "name": "/",
      "tags": [],
      "tracing": false
    }
  ]
}

Publish message

Publish a message to an exchange, or straight to a queue by leaving the exchange empty and putting the queue's name in Routing key. Returns whether any queue received it.

Inputs

Exchangeexchangetext
The exchange to publish to. Leave empty to deliver straight to the queue named in Routing key.
Routing keyrouting_keytext
Decides which bound queues receive the message - or, with no exchange, the queue's name.
Message bodypayloadtextRequired
The message. An object from an earlier step is sent as JSON.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).
Body formatpayload_encodingtext
Choose Base64 to send binary data encoded as base64.One of: string (Text), base64 (Base64 (binary data)). Default: string.
Content typecontent_typetext
Such as application/json or text/plain.
Persistentpersistenttrue/false
Write the message to disk so it survives a broker restart (in a durable queue).Default: true.
Headersheadersobject
Message headers, also used by headers exchanges.
Priorityprioritynumber
0-255. Only matters on a queue created with x-max-priority.From 0 to 255.
Correlation IDcorrelation_idtext
Ties a reply to its request.
Reply toreply_totext
The queue a reply should go to.
Expires after (seconds)expiration_secondsnumber
Discard the message if unread after this long.At least 0.001.
Message IDmessage_idtext
Your own identifier for the message.
Timestamptimestampdate and time
The message's timestamp property.
Message typemessage_typetext
The message's type property, such as order.created.
App IDapp_idtext
The publishing application's name.
Fail if no queue receives itfail_if_unroutabletrue/false
Fail the step instead of succeeding when the message matched no binding and was dropped.Default: false.

Outputs

exchangetext
Exchange published to (empty for the default)
routedtrue/false
Whether at least one queue received the message
routing_keytext
Routing key used
vhosttext
Virtual host
Example output
{
  "exchange": "orders.events",
  "routed": true,
  "routing_key": "orders.created",
  "vhost": "/"
}

Purge queue

Delete every ready message in a queue, keeping the queue. This cannot be undone.

Inputs

QueuequeuetextRequired
The queue's name, exactly as it appears in List queues.
Virtual hostvhosttext
The virtual host to work in. Leave empty to use the one set on the connection ('/' if none was).

Outputs

messages_beforenumber
Approximate messages in the queue before
purgedtrue/false
Always true
queuetext
Queue name
vhosttext
Virtual host
Example output
{
  "messages_before": 3,
  "purged": true,
  "queue": "orders",
  "vhost": "/"
}

On this page