Skip to main content
The RabbitMQ connector publishes each selected Novu webhook event as a separate message using one routing key. Novu webhook delivery is powered by Svix. This connector maps to the Svix RabbitMQ advanced endpoint.
Outbound webhooks are available on Team and Enterprise plans.

Prerequisites

  • A RabbitMQ instance reachable over AMQP from the public internet
  • An AMQP connection URI that includes credentials and the virtual host
  • A routing key that resolves to the queue you want to consume from
  • A RabbitMQ user with configure, write, and read permissions scoped to that virtual host
The connector takes a connection URI and a routing key. There is no separate exchange field, so encode the credentials and virtual host in the URI and make sure the routing key resolves through the default exchange or an existing binding.

Configuration

Transformation contract

The handler receives one delivery batch:
  • input.events, an array whose length is capped by the endpoint batch size
  • input.events[].eventType, the Novu event type, for example message.sent
  • input.events[].payload, the webhook body
The webhook body wraps the resource in an envelope. payload.object is the resource type as a string, such as "message", and the resource itself is under payload.data.object. For message events, fields such as subscriberId and channel are therefore at event.payload.data.object. Other event families use different resource shapes, so guard extracted fields with defaults. It returns an array of strings:
Each string in payloads becomes a separate RabbitMQ message. The default transformation serializes each event:
With the default transformation, a message.sent event is published as a single message whose body contains both the event type and the Novu payload:

Novu example

Consumers usually want the event type and the message fields at the top level so they can route without walking the nested payload. Novu message fields are under payload.data.object:
Guard every extracted field with a default. Preference and workflow events do not carry the same properties as message events, and one selected event type with a missing field fails the whole batch. Return fewer strings than input.events.length to filter events in the transformation, or a single string to combine a batch into one message. The connector publishes each returned string separately and does not guarantee ordering, so consumers should treat messages as independent.

Configure in the Dashboard

1

Prepare RabbitMQ

Create the required RabbitMQ routing and credentials. Confirm the connection URI works from a network location allowed by your RabbitMQ deployment.
2

Add the endpoint

Open Webhooks in the Novu Dashboard, select Endpoints, click Add Endpoint, and choose .
3

Enter connection details

Enter the URI and Routing key.
4

Configure the transformation

Start from the provided template. Return one serialized string in payloads for each RabbitMQ message you want to publish.
5

Select event types

Choose the event types to publish. Ensure the transformation returns a valid string for every selected event.
6

Test the endpoint

Create the endpoint. In Testing, send an example for a subscribed event type. Confirm success in Logs, then consume from the bound queue and compare the message body with the transformed payload.

Verify delivery

Read one message from the destination queue without acknowledging it:
Compare the returned payload with the transformation output in the endpoint’s Logs. If the queue is empty while Logs shows a successful delivery, the routing key did not resolve to this queue. Check the binding before you change the transformation.

Troubleshooting

  • The connector cannot connect: Check the URI scheme, host, port, credentials, and encoded virtual host. Confirm the RabbitMQ service is reachable.
  • Authentication or authorization fails: Confirm the URI credentials are active and allowed to publish through the configured virtual host and routing.
  • Delivery succeeds but no queue receives a message: Check that the routing key is bound to the intended queue.
  • RabbitMQ receives invalid content: Return strings in payloads. Use JSON.stringify for JSON message bodies.
  • A selected event is absent: Confirm the transformation creates one payloads entry for that event and review the endpoint event selection.

Official references