RabbitMQ

Send events to a RabbitMQ exchange via AMQP. The event topic is used as the routing key, allowing you to bind queues to specific topic patterns.

Creating a RabbitMQ Destination

curl 'https://api.outpost.hookdeck.com/2025-07-01/tenants/<TENANT_ID>/destinations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
  "type": "rabbitmq",
  "topics": ["orders"],
  "config": {
    "server_url": "rabbitmq.example.com:5672",
    "exchange": "events"
  },
  "credentials": {
    "username": "guest",
    "password": "guest"
  }
}'

Configuration

Config

FieldTypeRequiredDescription
config.server_urlstringYesRabbitMQ server address (host:port)
config.exchangestringYesExchange name
config.tlsstringNoEnable TLS: true or false (default: false)

Credentials

FieldTypeRequiredDescription
credentials.usernamestringYesRabbitMQ username
credentials.passwordstringYesRabbitMQ password

Message Format

Events are published as AMQP messages:

  • Body: The event's data field as JSON
  • Headers: System metadata (event-id, topic, timestamp) plus any event metadata from the published event
  • Routing Key: The event topic

Example

Publishing this event:

{
  "topic": "orders",
  "data": { "order_id": "123", "status": "created" },
  "metadata": { "source": "checkout-service" }
}

Results in:

Body:

{"order_id": "123", "status": "created"}

Headers:

HeaderValue
event-idevt_123
topicorders
timestamp1704067200
sourcecheckout-service

Routing Key: orders

Exchange Setup

Ensure the exchange exists before creating destinations. Outpost publishes with the event topic as the routing key:

# Create a topic exchange
rabbitmqadmin declare exchange name=events type=topic

# Bind a queue to receive all order events
rabbitmqadmin declare queue name=order-events
rabbitmqadmin declare binding source=events destination=order-events routing_key="orders.*"

TLS Configuration

{
  "type": "rabbitmq",
  "topics": ["orders"],
  "config": {
    "server_url": "rabbitmq.example.com:5671",
    "exchange": "events",
    "tls": "true"
  },
  "credentials": {
    "username": "user",
    "password": "password"
  }
}