> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ampersand.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# RabbitMQ destinations

> Publish synced data as JSON messages to an existing RabbitMQ exchange, setting the server URL, optional TLS, and publish credentials in the Dashboard.

For more information on destinations, see the [Destinations](/destinations) page.

When new data is read from a SaaS instance via a [Read Action](/read-actions) or [Subscribe Action](/subscribe-actions), Ampersand publishes the payload as messages to your RabbitMQ instance.

## Prerequisites

Before setting up a RabbitMQ destination, ensure that you have:

* A RabbitMQ instance reachable from the internet
* An exchange that already exists on that instance
* A username and password with permission to publish to that exchange

## Data format

Ampersand publishes each read or subscribe message to your RabbitMQ exchange as JSON. The full payload schema is defined in [webhook.yaml](https://github.com/amp-labs/openapi/blob/main/webhook/webhook.yaml).

## Create a RabbitMQ destination

Go to the [Destinations page](https://dashboard.withampersand.com/projects/_/destinations) in the Ampersand Dashboard and create a new RabbitMQ destination.

You'll need to provide:

| Field | Type | Required | Example | Description |
| - | - | - | - | - |
| **Destination name** | string | Yes | `ampersandRabbitMQ` | Alias to reference in your `amp.yaml` file |
| **Server URL** | string | Yes | `rabbitmq.example.com:5672` | Host and port of your RabbitMQ instance |
| **Exchange** | string | Yes | `ampersand-events` | Name of an exchange that already exists |
| **TLS** | boolean | No | `false` | Whether to connect over TLS. Defaults to false (plain AMQP); set to true for managed brokers that require TLS, e.g. CloudAMQP |
| **Username** | string | Yes | `ampersand` | Username with permission to publish |
| **Password** | string | Yes | | Password for the username |

## Refer to the destination in your integration

After creating your RabbitMQ destination, reference it in your `amp.yaml` file:

```yaml theme={"dark"}
specVersion: 1.0.0
integrations:
  - name: salesforceToRabbitMQ
    displayName: Salesforce to RabbitMQ
    provider: salesforce
    read:
      objects:
        - objectName: account
          destination: ampersandRabbitMQ
        - objectName: contact
          destination: ampersandRabbitMQ
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.