RabbitMQ

Publish events to RabbitMQ exchanges via the HTTP Management API.

The rabbitmq provider publishes events to a RabbitMQ exchange via the HTTP Management API's /api/exchanges/{vhost}/{exchange}/publish endpoint.

When to use this: you already run RabbitMQ and want webhooks to fan out through your existing exchanges and queues.

Cloudflare Workers can't speak AMQP — it needs raw TCP sockets. hookstream publishes via the RabbitMQ HTTP Management API instead, which means you must enable the management plugin and expose it over HTTPS. This is fine for most setups, but it's not the AMQP fast path you might be used to.

Configuration

url string required

RabbitMQ Management API base URL (usually port 15672), e.g. https://rabbitmq.example.com:15672. No trailing slash required.

vhost string default: /

Virtual host to publish into. URL-encoded automatically — use / for the default vhost.

exchange string required

Exchange name to publish to. The exchange must already exist.

routing_key string required

Routing key applied to every published message.

username string required

RabbitMQ username with publish permissions.

password string required

RabbitMQ password. Stored encrypted and masked in GET responses.

Authentication

hookstream uses HTTP Basic auth (username:password) on every publish request. Create a dedicated RabbitMQ user with only publish permissions on the target exchange:

bash
rabbitmqctl add_user hookstream <password> rabbitmqctl set_permissions -p / hookstream "" "^webhooks$" ""

(The three regex args are configure/write/read — the example above allows writing only to the webhooks exchange.)

Message Format

Each publish call looks like:

json
{ "properties": { "content_type": "application/json", "headers": { "hookstream-event-id": "evt_abc123", "hookstream-destination-id": "dest_xyz" } }, "routing_key": "events", "payload": "{...webhook body as a string...}", "payload_encoding": "string" }

Success requires both a 2xx response and a response body of {"routed": true}. A 200 OK with {"routed": false} is treated as a delivery failure so an unbound exchange won't silently swallow events.

Example

bash
curl -X POST https://hookstream.io/v1/destinations \ -H "X-API-Key: $HOOKSTREAM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Message Broker", "type": "rabbitmq", "config": { "url": "https://rabbitmq.example.com:15672", "vhost": "/", "exchange": "webhooks", "routing_key": "events", "username": "hookstream", "password": "secret" } }'

Gotchas

The Management API ships with RabbitMQ but isn't always enabled:

bash
rabbitmq-plugins enable rabbitmq_management

The API listens on port 15672 by default.

Don't put the Management API on the public internet without TLS. Use a reverse proxy (nginx, Caddy, Cloudflare Tunnel) or whitelist Cloudflare egress IPs at the firewall.

If your exchange has no matching binding, RabbitMQ returns {"routed": false}. hookstream treats this as a failure so it'll retry and eventually raise an issue — bind at least one queue before publishing.

Next Steps

Kafka

Produce to Kafka topics via Confluent REST Proxy.

Learn More
HTTP / Webhook

Deliver straight to an HTTP endpoint instead.

Learn More
Circuit Breaker

How hookstream protects failing exchanges from being hammered.

Learn More
Destinations API

Full API reference.

Learn More
Ask a question... ⌘I