<a id="cc-rabbitmq-sink"></a>

# RabbitMQ Sink Connector for Confluent Cloud

The fully managed RabbitMQ Sink connector for Confluent Cloud uses the AMQP protocol to
communicate with RabbitMQ servers. The RabbitMQ Sink connector reads data from
one or more Apache Kafka® topics and sends the data to a RabbitMQ exchange.

#### NOTE
* This Quick Start is for the fully managed Confluent Cloud connector. If you are
  installing the connector locally for Confluent Platform, see [RabbitMQ Sink Connector for
  Confluent Platform](https://docs.confluent.io/kafka-connectors/rabbitmq-sink/current/).
* If you require private networking for fully managed connectors, make sure to set up the proper
  networking beforehand. For more information, see [Manage Networking for Confluent Cloud Connectors](networking/internet-resource.md#clusters-connect-cloud).

## Features

The RabbitMQ Sink connector provides the following features:

* **At least once delivery**: The connector guarantees that records are delivered at least once from the Kafka topic to the RabbitMQ exchange.
* **Dead Letter Queue**: This connector supports the Dead Letter Queue (DLQ) functionality. For information about accessing and using the DLQ, see the [View Connector Dead Letter Queue Errors in Confluent Cloud](dead-letter-queue.md#ccloud-dlq-topics) docs.
* **Supports multiple tasks**: The connector supports running one or more tasks. More tasks may improve performance.
* **Header forwarding**: The connector supports forwarding Kafka headers and metadata to the RabbitMQ message as headers. The Kafka message key can also be forwarded as the `correlationID` on the RabbitMQ message
* **RabbitMQ Exchange delivery**: The connector supports delivering to one configured RabbitMQ exchange. When multiple Kafka topics are specified to read from, the messages are produced to this one RabbitMQ exchange.
* **Publishes bytes as payload**: The RabbitMQ message supports publishing bytes as payload. The connector supports storing raw bytes in RabbitMQ using the `value.converter` set to `org.apache.kafka.connect.converters.ByteArrayConverter`. Using the ByteArrayConverter for value, the connector stores the binary serialized form (for example, JSON, Avro, Strings, etc.) of the Kafka record values in RabbitMQ as byte arrays. Applications accessing these values can then read this information from RabbitMQ and deserialize the bytes into a usable form. If your data in Kafka is not in the format you want to persist in RabbitMQ, consider using [Configure Single Message Transformations for Kafka Connectors in Confluent Cloud](single-message-transforms.md#cc-single-message-transforms) to change records before they are sent to RabbitMQ.
* **Supports SSL/TLS security**: The connector also supports SSL/TLS security to connect to the RabbitMQ server.
* **Batches records**: The connector batches the records from Kafka while publishing to RabbitMQ. This is controlled by the `rabbitmq.publish.max.batch.size` configuration property.

For more information and examples to use with the Confluent Cloud API for Connect,
see the [Confluent Cloud API for Connect Usage Examples](connect-api-section.md#ccloud-connect-api) section.

## Limitations

Be sure to review the following information.

* For connector limitations, see [RabbitMQ Sink Connector](limits.md#cc-rabbitmq-sink-limits) limitations.
* If you plan to use one or more Single Message Transformations (SMTs), see [SMT Limitations](single-message-transforms.md#cc-single-message-transforms-limitations).

#### IMPORTANT
Queue existence for a mapped topic in `rabbitmq.topic.queue.map` is
verified only at configuration submission. If a mapped queue is deleted
on the broker while the connector is running, subsequent records for
that topic are published to the RabbitMQ default exchange with a routing
key that no longer matches any queue, and the broker silently drops
them.

## Quick Start

Use this quick start to get up and running with the Confluent Cloud RabbitMQ Sink
connector. The quick start shows how to select the connector and configure it to
read data from Apache Kafka® topics and persist the data to a RabbitMQ exchange.

<a id="cc-rabbitmq-sink-prereqs"></a>

Prerequisites
: - Authorized access to a [Confluent Cloud](https://www.confluent.io/confluent-cloud/) cluster on Amazon Web Services (AWS), Microsoft Azure (Azure), or Google Cloud.
  - Authorized access to a RabbitMQ host server, exchange, and host security details.
  - The Confluent CLI installed and configured for the cluster. See [Install the Confluent CLI](https://docs.confluent.io/confluent-cli/current/install.html).
  - For networking considerations, see [Networking and DNS](overview.md#connect-internet-access-resources). To use a set of public egress IP addresses, see [Public Egress IP Addresses for Confluent Cloud Connectors](static-egress-ip.md#cc-static-egress-ips).
  <br/>
  - Kafka cluster credentials. The following lists the different ways you can provide credentials.
    - Enter an existing [service account](service-account.md#s3-cloud-service-account) resource ID.
    - Create a Confluent Cloud [service account](service-account.md#s3-cloud-service-account) for the connector. Make sure to review the ACL entries required in the [service account documentation](service-account.md#s3-cloud-service-account). Some connectors have specific ACL requirements.
    - Create a Confluent Cloud API key and secret. To create a key and secret, you can use [confluent api-key create](https://docs.confluent.io/confluent-cli/current/command-reference/api-key/confluent_api-key_create.html) *or* you can autogenerate the API key and secret directly in the Cloud Console when setting up the connector.

Refer to [Cloud connector limitations](limits.md#cc-rabbitmq-sink-limits) for additional information.

#### NOTE
There is no `input.data.format` configuration used with this sink connector. This is because this connector defaults to `ByteArrayConverter` for value and `StringConverter` for key. No other converter is useful for this connector.

### Using the Confluent Cloud Console

#### Step 1: Launch your Confluent Cloud cluster

To create and launch a Kafka cluster in Confluent Cloud, see [Create a kafka cluster in Confluent Cloud](../get-started/index.md#cloud-create-kafka-cluster).

#### Step 2: Add a connector

In the left navigation menu, click **Connectors**. If you already have connectors in your cluster, click **+ Add
connector**.

#### Step 3: Select your connector

Click the **RabbitMQ Sink** connector card.

![RabbitMQ Sink Connector Card](images/ccloud-rabbitmq-sink-icon.png)

#### Step 4: Enter the connector details

#### NOTE
* Ensure you have all your [prerequisites](#cc-rabbitmq-sink-prereqs) completed.
* An asterisk ( \* ) designates a required entry.

At the **Add RabbitMQ Sink Connector** screen, complete the following:

### Topic selection

If you’ve already populated your Kafka topics, select the topics you want
to connect from the **Topics** list.

To create a new topic, click **+Add new topic**.

### Kafka access

1. Select the way you want to provide **Kafka Cluster credentials**. You can
   choose one of the following options:
   - **My account**: This setting allows your connector to globally access everything
     that you have access to. With a user account, the connector uses an API key and
     secret to access the Kafka cluster. This option is not recommended for production.
   - **Service account**: This setting limits the access for your connector by using a
     [service account](service-account.md#s3-cloud-service-account). This option is recommended for
     production.
   - **Use an existing API key**: This setting allows you to specify an API key and a
     secret pair. You can use an existing pair or create a new one. This method is not
     recommended for production environments.

   #### NOTE
   Freight clusters support only service accounts for Kafka authentication.
2. Click **Continue**.

### Authentication

1. Configure the authentication properties:
   - **RabbitMQ host**: The RabbitMQ host server address to connect to.
     For example, `192.168.1.99`.
   - **RabbitMQ port**: The server port the connector uses to connect to
     the server. For example, `5672`.
   - **RabbitMQ username**: The username to use when authenticating to
     RabbitMQ.
   - **RabbitMQ password**: The password to use when authenticating to
     RabbitMQ.
   - **RabbitMQ virtual host**: The name of the virtual host created in
     [RabbitMQ](https://www.rabbitmq.com/vhosts.html).
   - **Security protocol**: The security protocol to use when connecting to
     RabbitMQ. Valid values are `PLAINTEXT` or `SSL`.
     If you select `SSL`, enter the following SSL details.
   - **SSL Key Password**: The private key password in the keystore file,
     or the PEM key specified in `ssl.keystore.key`. This is required
     for clients only if two-way authentication is configured.
   - **Key Store**: Upload the keystore file.
   - **SSL Keystore Password**: The store password for the key store file. This is optional for client
     and only needed if `ssl.keystore.location` is configured.  Key store
     password is not supported for PEM format.
   - **Trust Store**: The trust store containing server CA certificate. Only required if using `https`.
   - **SSL Truststore Password**: The password for the trust store file. If a password is not set, trust
     store file configured will still be used, but integrity checking is disabled.
     Trust store password is not supported for PEM format.
   - **SSL Keystore Type**: The file format of the key store file. This is optional for client.
   - **ssl.truststore.type**: The file format of the trust store file.
   - **RabbitMQ Destination Exchange**: The RabbitMQ destination exchange
     where messages are delivered. The connector delivers messages to this
     RabbitMQ exchange only, even when the connector consumes from
     multiple Kafka topics.
2. Click **Continue**.

### Configuration

#### NOTE
Configuration properties that are not shown in the
Cloud Console use the default values.See
[Configuration Properties](#cc-rabbitmq-sink-config-properties) for all property values and
definitions.

- **RabbitMQ Message Routing Key**: The routing key that RabbitMQ uses
  to determine how to route the message.
- **RabbitMQ Message Delivery Mode**: An option that determines the
  message durability in RabbitMQ. Options are `persistent` or
  `transient`. For more information, see the [RabbitMQ docs](https://www.rabbitmq.com/persistence-conf.html).

### **Show advanced configurations**

- **Schema context**: Select a schema context to use for this connector, if using
  a schema-based data format. This property defaults to the **Default** context,
  which configures the connector to use the default schema set up for Schema Registry in your
  Confluent Cloud environment. A schema context allows you to use separate schemas (like
  schema sub-registries) tied to topics in different Kafka clusters that share the
  same Schema Registry environment. For example, if you select a non-default context, a
  **Source** connector uses only that schema context to register a schema and a
  **Sink** connector uses only that schema context to read from. For more
  information about setting up a schema context, see [What are schema contexts and when should you use them?](../sr/faqs-cc.md#faq-schema-contexts).
- **Topic to queue map**: A JSON object mapping Kafka topic names to RabbitMQ queue names, for example, `{"topic-a": "queue-1", "topic-b": "queue-2"}`. Records from a mapped topic are published directly to their mapped queue using the RabbitMQ default (nameless) exchange. Unmapped topics fall back to `rabbitmq.exchange` with `rabbitmq.routing.key`.
- **Forward Kafka Record Key**: If enabled, the Kafka record key is
  converted to a string and forwarded on the RabbitMQ message
  `correlationID` property. The connector does not send a
  `correlationID` if the Kafka record key is `null` and this
  property is set to `true`.
- **Forward Kafka Record Metadata**: If set to `true`, the
  connector forwards Kafka record metadata as RabbitMQ message
  headers. This includes the record’s topic, partition, and offset.
  The topic name is forwarded as a header named `KAFKA_TOPIC`, the
  partition value is a header named `KAFKA_PARTITION`, and the
  offset value is a header named `KAFKA_OFFSET`.
- **Forward Kafka Record Headers**: If set to `true`, the
  connector adds Kafka record headers to the RabbitMQ message as
  headers.
- **Maximum batch size for publish acknowledgements**: The maximum number of messages in a batch to block on for acknowledgements.
  Maximum allowed size is 10000.
- **Time to wait for message acknowledgements**: The period of time to wait for message acknowledgement in milliseconds.
  Minimum allowed timeout is 1 millisecond. Maximum allowed timeout is 60 seconds.
- **Message publish retries**: The number of retries the connector attempts for unacknowledged or negatively acknowledged messages.

**Auto-restart policy**

- **Enable Connector Auto-restart**: Enables the auto-restart behavior of the connector and its
  task in the event of user-actionable errors. Defaults to `true`, enabling the connector to
  automatically restart in case of user-actionable errors. Set this property to `false` to
  disable auto-restart for failed connectors. If disabled, you must manually restart the connector.

**Additional Configs**

- **Value Converter Decimal Format**: Specifies the `JSON` or `JSON_SR` serialization format for Connect `DECIMAL` logical type values with two allowed literals:
  `BASE64` to serialize `DECIMAL` logical types as base64 encoded binary data, and
  `NUMERIC` to serialize `DECIMAL` logical type values in `JSON` or `JSON_SR` as a number representing the decimal value.
- **Schema GUID For Key Converter**: Sets the schema GUID to use for deserialization when using `ConfigSchemaIdDeserializer`. This lets you specify a fixed schema GUID for deserializing message keys. This property is applicable only when `key.converter.key.schema.id.deserializer` is set to `ConfigSchemaIdDeserializer`.
- **Value Converter Schema ID Deserializer**: Sets the class name of the schema ID deserializer for values. The deserializer reads schema IDs from message headers.
- **Schema GUID For Value Converter**: Sets the schema GUID to use for deserialization when using `ConfigSchemaIdDeserializer`. This lets you specify a fixed schema GUID for deserializing message values. This property is applicable only when `value.converter.value.schema.id.deserializer` is set to `ConfigSchemaIdDeserializer`.
- **Value Converter Reference Subject Name Strategy**: Sets the subject reference name strategy for values. Valid entries are `DefaultReferenceSubjectNameStrategy` or `QualifiedReferenceSubjectNameStrategy`. You can use this strategy only with `PROTOBUF` format; the default strategy is `DefaultReferenceSubjectNameStrategy`.
- **Schema ID For Value Converter**: Sets the schema ID to use for deserialization when using `ConfigSchemaIdDeserializer`. This lets you specify a fixed schema ID for deserializing message values. This property is applicable only when `value.converter.value.schema.id.deserializer` is set to `ConfigSchemaIdDeserializer`.
- **Value Converter Connect Meta Data**: Enables the Connect converter to add its metadata to the output schema. Applies to Avro converters.
- **Value Converter Value Subject Name Strategy**: Determines how to construct the subject name under which the value schema is registered with Schema Registry.
- **Key Converter Key Subject Name Strategy**: Determines how to construct the subject name for key schema registration.
- **Key Converter Schema ID Deserializer**: Sets the class name of the schema ID deserializer for keys. The deserializer reads schema IDs from message headers.
- **Schema ID For Key Converter**: Sets the schema ID to use for deserialization when using `ConfigSchemaIdDeserializer`. This lets you specify a fixed schema ID for deserializing message keys. This property is applicable only when `key.converter.key.schema.id.deserializer` is set to `ConfigSchemaIdDeserializer`.

**Consumer configuration**

- **Max poll interval(ms)**: Sets the maximum delay between subsequent consume requests to Kafka. Use this property to
  improve connector performance in cases when the connector cannot send records to the sink system.
  The default is 300,000 milliseconds (5 minutes).
- **Max poll records**: Sets the maximum number of records to consume from Kafka in a single request. Use this property to
  improve connector performance in cases when the connector cannot send records to the sink system.
  The default is 500 records.

**Transforms**

- **Single Message Transformations**: To add a new SMT, see [Add transforms](single-message-transforms.md#cc-single-message-transforms-ui).
  For more information about unsupported SMTs, see
  [Unsupported transformations](single-message-transforms.md#cc-single-message-transforms-unsupported-transforms).

- Click **Continue**.

### Sizing

Based on the number of topic partitions you select, you will be provided
with a recommended number of tasks.

1. To change the number of recommended tasks, enter the number of
   [tasks](/platform/current/connect/concepts.html#tasks) for the connector to use in
   the **Tasks** field.
2. Click **Continue**.

### Review and Launch

1. Verify the connection details by previewing the running configuration.
2. Once you’ve validated that the properties are configured to your
   satisfaction, click **Launch**.

> The status for the connector should go from **Provisioning** to
> **Running**. It may take a few minutes.

#### Step 5: Check the RabbitMQ destination

After the connector is running, verify that messages from your Kafka topic are
populated to the configured RabbitMQ exchange.

For more information and examples to use with the Confluent Cloud API for Connect,
see the [Confluent Cloud API for Connect Usage Examples](connect-api-section.md#ccloud-connect-api) section.

### Using the Confluent CLI

Complete the following steps to set up and run the connector using the Confluent CLI.

#### NOTE
Make sure you have all your [prerequisites](#cc-rabbitmq-sink-prereqs) completed.

#### Step 1: List the available connectors

Enter the following command to list available connectors:

```none
confluent connect plugin list
```

#### Step 2: List the connector configuration properties

Enter the following command to show the connector configuration properties:

```none
confluent connect plugin describe <connector-plugin-name>
```

The command output shows the required and optional configuration properties.

#### Step 3: Create the connector configuration file

Create a JSON file that contains the connector configuration properties. The following example shows the required connector properties.

```none
{
    "name" : "RabbitMQSinkConnector_0",
    "connector.class": "RabbitMQSink",
    "topics" : "pageviews",
    "kafka.auth.mode": "KAFKA_API_KEY",
    "kafka.api.key": "<my-kafka-api-key>",
    "kafka.api.secret": "<my-kafka-api-secret>",
    "rabbitmq.host" : "192.168.1.99",
    "rabbitmq.exchange" : "exchange_1",
    "rabbitmq.routing.key" : "routingkey_1",
    "rabbitmq.delivery.mode" : "PERSISTENT",
    "tasks.max" : "1"
}
```

Note the following property definitions:

* `"name"`: Sets a name for your new connector.
* `"connector.class"`: Identifies the connector plugin name.
* `"topics"`: Enter Kafka topic name or comma-separated list of topic names.

* `"kafka.auth.mode"`: Identifies the connector authentication mode you want to use. There are two options: `SERVICE_ACCOUNT` or `KAFKA_API_KEY` (the default). To use an API key and secret, specify the configuration properties `kafka.api.key` and `kafka.api.secret`, as shown in the example configuration (above).  To use a [service account](service-account.md#s3-cloud-service-account), specify the **Resource ID** in the property `kafka.service.account.id=<service-account-resource-ID>`. To list the available service account resource IDs, use the following command:
  ```bash
  confluent iam service-account list
  ```

  For example:
  ```bash
  confluent iam service-account list

     Id     | Resource ID |       Name        |    Description
  +---------+-------------+-------------------+-------------------
     123456 | sa-l1r23m   | sa-1              | Service account 1
     789101 | sa-l4d56p   | sa-2              | Service account 2
  ```

* `"rabbitmq.<...>"`: See the [RabbitMQ Sink configuration properties](#cc-rabbitmq-sink-config-properties) for property values and definitions. Note that the connector configuration defaults to host port `5672` (i.e., `"rabbitmq.port"` : `"5672"`).
* `"tasks.max"`: Enter the number of [tasks](/platform/current/connect/concepts.html#tasks) that the connector uses. The connector supports running one or more tasks. More tasks may improve performance.

For TLS connections, you must supply the keystore and/or truststore file
contents and the file passwords when creating JSON connector configuration. The
truststore and keystore files are binary files. For the
`rabbitmq.https.ssl.keystorefile` and  `rabbitmq.https.ssl.truststorefile`
properties, you must do the following:

1. Encode the truststore or keystore file in base64.
2. Take the encoded string and add the `data:text/plain:base64` prefix.
3. Use the entire string as the property entry. For example:
   ```bash
   "rabbitmq.https.ssl.keystorefile" : "data:text/plain;base64,/u3+7QAAAAIAAAACAAAAAQAGY2xpZ...omitted...=="
   ```

**SMTs**: For details about adding SMTs using the Confluent CLI, see the [Single Message Transformations](single-message-transforms.md#cc-single-message-transforms) documentation. For a list of SMTs that are not supported with this sink connector, see [Unsupported transformations](single-message-transforms.md#cc-single-message-transforms-unsupported-transforms).

See [Configuration Properties](#cc-rabbitmq-sink-config-properties) for all property values and
definitions.

#### Step 4: Load the properties file and create the connector

Enter the following command to load the configuration and start the connector:

```none
confluent connect cluster create --config-file <file-name>.json
```

For example:

```none
confluent connect cluster create --config-file rabbitmq-sink.json
```

Example output:

```none
Created connector RabbitMQSinkConnector_0 lcc-ix4dl
```

#### Step 5: Check the connector status

Enter the following command to check the connector status:

```none
confluent connect cluster list
```

Example output:

```none
ID          |            Name           | Status  |  Type
+-----------+---------------------------+---------+-------+
lcc-ix4dl   | RabbitMQSinkConnector_0   | RUNNING | sink
```

#### Step 6: Check the RabbitMQ destination.

After the connector is running, verify that messages are populating from your Kafka topic to the configured RabbitMQ exchange.

For more information and examples to use with the Confluent Cloud API for Connect,
see the [Confluent Cloud API for Connect Usage Examples](connect-api-section.md#ccloud-connect-api) section.

<a id="cc-rabbitmq-sink-config-properties"></a>

## Configuration Properties

Use the following configuration properties with the fully managed connector. For
self-managed connector property definitions and other details, see the connector
docs in [Self-managed connectors for Confluent Platform](/platform/current/connect/kafka_connectors.html).

### Which topics do you want to get data from?

`topics.regex`
: A regular expression that matches the names of the topics to consume from. This is useful when you want to consume from multiple topics that match a certain pattern without having to list them all individually.
  <br/>
  * Type: string
  * Importance: low

`topics`
: Identifies the topic name or a comma-separated list of topic names.
  <br/>
  * Type: list
  * Importance: high

### Schema Config

`schema.context.name`
: Add a schema context name. A schema context represents an independent scope in Schema Registry. It is a separate sub-schema tied to topics in different Kafka clusters that share the same Schema Registry instance. If not used, the connector uses the default schema configured for Schema Registry in your Confluent Cloud environment.
  <br/>
  * Type: string
  * Default: default
  * Importance: medium

### How should we connect to your data?

`name`
: Sets a name for your connector.
  <br/>
  * Type: string
  * Valid Values: A string at most 64 characters long
  * Importance: high

### Kafka Cluster credentials

`kafka.auth.mode`
: Kafka Authentication mode. It can be one of KAFKA_API_KEY or SERVICE_ACCOUNT. It defaults to KAFKA_API_KEY mode, whenever possible.
  <br/>
  * Type: string
  * Valid Values: SERVICE_ACCOUNT, KAFKA_API_KEY
  * Importance: high

`kafka.api.key`
: Kafka API Key. Required when kafka.auth.mode==KAFKA_API_KEY.
  <br/>
  * Type: password
  * Importance: high

`kafka.service.account.id`
: The Service Account that will be used to generate the API keys to communicate with Kafka Cluster.
  <br/>
  * Type: string
  * Importance: high

`kafka.api.secret`
: Secret associated with Kafka API key. Required when kafka.auth.mode==KAFKA_API_KEY.
  <br/>
  * Type: password
  * Importance: high

### RabbitMQ Publishing

`rabbitmq.publish.max.batch.size`
: Maximum number of messages in a batch to block on for acknowledgements. Maximum allowed size is 10000.
  <br/>
  * Type: int
  * Default: 100
  * Valid Values: [1,…,10000]
  * Importance: medium

`rabbitmq.publish.ack.timeout`
: Period of time to wait for message acknowledgement in milliseconds. Minimum allowed timeout is 1 millisecond. Maximum allowed timeout is 60 seconds.
  <br/>
  * Type: int
  * Default: 10000
  * Valid Values: [1,…,60000]
  * Importance: medium

`rabbitmq.publish.max.retries`
: Number of retries for un-acked or n-acked messages.
  <br/>
  * Type: int
  * Default: 1
  * Valid Values: [0,…]
  * Importance: medium

### Security

`rabbitmq.security.protocol`
: The security protocol to use when connection to RabbitMQ. Values can be PLAINTEXT or SSL.
  <br/>
  * Type: string
  * Default: PLAINTEXT
  * Importance: medium

`rabbitmq.https.ssl.key.password`
: The password of the private key in the key store file or the PEM key specified in `ssl.keystore.key`. This is required for clients only if two-way authentication is configured.
  <br/>
  * Type: password
  * Importance: high

`rabbitmq.https.ssl.keystorefile`
: The key store containing server certificate. Only required if using https
  <br/>
  * Type: password
  * Default: [hidden]
  * Importance: high

`rabbitmq.https.ssl.keystore.password`
: The store password for the key store file. This is optional for client and only needed if `ssl.keystore.location` is configured.  Key store password is not supported for PEM format.
  <br/>
  * Type: password
  * Importance: high

`rabbitmq.https.ssl.truststorefile`
: The trust store containing server CA certificate. Only required if using https
  <br/>
  * Type: password
  * Default: [hidden]
  * Importance: high

`rabbitmq.https.ssl.truststore.password`
: The password for the trust store file. If a password is not set, trust store file configured will still be used, but integrity checking is disabled. Trust store password is not supported for PEM format.
  <br/>
  * Type: password
  * Importance: high

`rabbitmq.https.ssl.keystore.type`
: The file format of the key store file. This is optional for client.
  <br/>
  * Type: string
  * Default: JKS
  * Importance: medium

`rabbitmq.https.ssl.truststore.type`
: The file format of the trust store file.
  <br/>
  * Type: string
  * Default: JKS
  * Importance: medium

### Connection

`rabbitmq.host`
: RabbitMQ host to connect to.
  <br/>
  * Type: string
  * Importance: high

`rabbitmq.port`
: RabbitMQ port to connect to.
  <br/>
  * Type: int
  * Default: 5672
  * Valid Values: [0,…,65535]
  * Importance: medium

`rabbitmq.username`
: Username to authenticate to RabbitMQ with.
  <br/>
  * Type: string
  * Importance: high

`rabbitmq.password`
: Password to authenticate to RabbitMQ with.
  <br/>
  * Type: password
  * Importance: high

`rabbitmq.virtual.host`
: The virtual host to use when connecting to the broker.
  <br/>
  * Type: string
  * Default: /
  * Importance: low

### RabbitMQ

`rabbitmq.routing.key`
: RabbitMQ routing key that dictates how the message travels after it reaches RabbitMQ. Applied only to messages routed through `rabbitmq.exchange` (unmapped topics); records for topics listed in `rabbitmq.topic.queue.map` use the mapped queue name as the routing key against the default exchange instead.
  <br/>
  * Type: string
  * Importance: high

`rabbitmq.delivery.mode`
: PERSISTENT or TRANSIENT, decides message durability in RabbitMQ.
  <br/>
  * Type: string
  * Importance: high

`rabbitmq.topic.queue.map`
: JSON object mapping Kafka topic names to RabbitMQ queue names, e.g. {“topic-a”:”queue-1”,”topic-b”:”queue-2”}. Records from a mapped topic are published directly to their mapped queue via the RabbitMQ default (nameless) exchange. Unmapped topics fall back to `rabbitmq.exchange` with `rabbitmq.routing.key`.
  <br/>
  * Type: string
  * Default: “”
  * Importance: medium

`rabbitmq.forward.kafka.key`
: If enabled, the Kafka record key is converted to a string and forwarded on the correlationID property of the RabbitMQ Message. In case the Kafka record key is null and this value is true, no correlationID will be sent.
  <br/>
  * Type: boolean
  * Importance: low

`rabbitmq.forward.kafka.metadata`
: If enabled, metadata from the Kafka record is forwarded on the RabbitMQ Message as headers. This includes the record’s topic, partition, and offset. The topic name is applied as a header named KAFKA_TOPIC, the partition value is applied as a header named KAFKA_PARTITION, and the offset value is applied as a header named KAFKA_OFFSET.
  <br/>
  * Type: boolean
  * Importance: low

`rabbitmq.forward.kafka.headers`
: If enabled, Kafka record headers are added to the RabbitMQ Message as headers.
  <br/>
  * Type: boolean
  * Importance: low

`rabbitmq.exchange`
: The destination RabbitMQ exchange where messages need to be delivered when no `rabbitmq.topic.queue.map` entry matches. The connector delivers messages to this RabbitMQ exchange for all unmapped topics; records from a mapped topic bypass this exchange and are published directly to their mapped queue via the default (nameless) exchange.
  <br/>
  * Type: string
  * Importance: high

### Consumer configuration

`max.poll.interval.ms`
: The maximum delay between subsequent consume requests to Kafka. This configuration property may be used to improve the performance of the connector, if the connector cannot send records to the sink system. Defaults to 300000 milliseconds (5 minutes).
  <br/>
  * Type: long
  * Default: 300000 (5 minutes)
  * Valid Values: [60000,…,1800000] for non-dedicated clusters and [60000,…] for dedicated clusters
  * Importance: low

`max.poll.records`
: The maximum number of records to consume from Kafka in a single request. This configuration property may be used to improve the performance of the connector, if the connector cannot send records to the sink system. Defaults to 500 records.
  <br/>
  * Type: long
  * Default: 500
  * Valid Values: [1,…,500] for non-dedicated clusters and [1,…] for dedicated clusters
  * Importance: low

### Number of tasks for this connector

`tasks.max`
: Maximum number of tasks for the connector.
  <br/>
  * Type: int
  * Valid Values: [1,…]
  * Importance: high

### Auto-restart policy

`auto.restart.on.user.error`
: Enable connector to automatically restart on user-actionable errors.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: medium

### Additional Configs

`consumer.override.auto.offset.reset`
: Defines the behavior of the consumer when there is no committed position (which occurs when the group is first initialized) or when an offset is out of range. You can choose either to reset the position to the “earliest” offset (the default) or the “latest” offset. You can also select “none” if you would rather set the initial offset yourself and you are willing to handle out of range errors manually. More details: [https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#auto-offset-reset](https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#auto-offset-reset)
  <br/>
  * Type: string
  * Importance: low

`consumer.override.isolation.level`
: Controls how to read messages written transactionally. If set to read_committed, consumer.poll() will only return transactional messages which have been committed. If set to read_uncommitted (the default), consumer.poll() will return all messages, even transactional messages which have been aborted. Non-transactional messages will be returned unconditionally in either mode.  More details: [https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#isolation-level](https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#isolation-level)
  <br/>
  * Type: string
  * Importance: low

`header.converter`
: The converter class for the headers. This is used to serialize and deserialize the headers of the messages.
  <br/>
  * Type: string
  * Importance: low

`key.converter.use.schema.guid`
: The schema GUID to use for deserialization when using ConfigSchemaIdDeserializer. This allows you to specify a fixed schema GUID to be used for deserializing message keys. Only applicable when key.converter.key.schema.id.deserializer is set to ConfigSchemaIdDeserializer.
  <br/>
  * Type: string
  * Importance: low

`key.converter.use.schema.id`
: The schema ID to use for deserialization when using ConfigSchemaIdDeserializer. This allows you to specify a fixed schema ID to be used for deserializing message keys. Only applicable when key.converter.key.schema.id.deserializer is set to ConfigSchemaIdDeserializer.
  <br/>
  * Type: int
  * Importance: low

`value.converter.allow.optional.map.keys`
: Allow optional string map key when converting from Connect Schema to Avro Schema. Applicable for Avro Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.auto.register.schemas`
: Specify if the Serializer should attempt to register the Schema.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.connect.meta.data`
: Allow the Connect converter to add its metadata to the output schema. Applicable for Avro Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.enhanced.avro.schema.support`
: Enable enhanced schema support to preserve package information and Enums. Applicable for Avro Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.enhanced.protobuf.schema.support`
: Enable enhanced schema support to preserve package information. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.flatten.unions`
: Whether to flatten unions (oneofs). Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.generate.index.for.unions`
: Whether to generate an index suffix for unions. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.generate.struct.for.nulls`
: Whether to generate a struct variable for null values. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.int.for.enums`
: Whether to represent enums as integers. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.latest.compatibility.strict`
: Verify latest subject version is backward compatible when use.latest.version is true.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.object.additional.properties`
: Whether to allow additional properties for object schemas. Applicable for JSON_SR Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.optional.for.nullables`
: Whether nullable fields should be specified with an optional label. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.optional.for.proto2`
: Whether proto2 optionals are supported. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.use.latest.version`
: Use latest version of schema in subject for serialization when auto.register.schemas is false.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.use.optional.for.nonrequired`
: Whether to set non-required properties to be optional. Applicable for JSON_SR Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.use.schema.guid`
: The schema GUID to use for deserialization when using ConfigSchemaIdDeserializer. This allows you to specify a fixed schema GUID to be used for deserializing message values. Only applicable when value.converter.value.schema.id.deserializer is set to ConfigSchemaIdDeserializer.
  <br/>
  * Type: string
  * Importance: low

`value.converter.use.schema.id`
: The schema ID to use for deserialization when using ConfigSchemaIdDeserializer. This allows you to specify a fixed schema ID to be used for deserializing message values. Only applicable when value.converter.value.schema.id.deserializer is set to ConfigSchemaIdDeserializer.
  <br/>
  * Type: int
  * Importance: low

`value.converter.wrapper.for.nullables`
: Whether nullable fields should use primitive wrapper messages. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.wrapper.for.raw.primitives`
: Whether a wrapper message should be interpreted as a raw primitive at root level. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`key.converter.key.schema.id.deserializer`
: The class name of the schema ID deserializer for keys. This is used to deserialize schema IDs from the message headers.
  <br/>
  * Type: string
  * Default: io.confluent.kafka.serializers.schema.id.DualSchemaIdDeserializer
  * Importance: low

`key.converter.key.subject.name.strategy`
: How to construct the subject name for key schema registration.
  <br/>
  * Type: string
  * Default: TopicNameStrategy
  * Importance: low

`value.converter.decimal.format`
: Specify the JSON/JSON_SR serialization format for Connect DECIMAL logical type values with two allowed literals:
  <br/>
  BASE64 to serialize DECIMAL logical types as base64 encoded binary data and
  <br/>
  NUMERIC to serialize Connect DECIMAL logical type values in JSON/JSON_SR as a number representing the decimal value.
  <br/>
  * Type: string
  * Default: BASE64
  * Importance: low

`value.converter.flatten.singleton.unions`
: Whether to flatten singleton unions. Applicable for Avro and JSON_SR Converters.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`value.converter.reference.subject.name.strategy`
: Set the subject reference name strategy for value. Valid entries are DefaultReferenceSubjectNameStrategy or QualifiedReferenceSubjectNameStrategy. Note that the subject reference name strategy can be selected only for PROTOBUF format with the default strategy being DefaultReferenceSubjectNameStrategy.
  <br/>
  * Type: string
  * Default: DefaultReferenceSubjectNameStrategy
  * Importance: low

`value.converter.value.schema.id.deserializer`
: The class name of the schema ID deserializer for values. This is used to deserialize schema IDs from the message headers.
  <br/>
  * Type: string
  * Default: io.confluent.kafka.serializers.schema.id.DualSchemaIdDeserializer
  * Importance: low

`value.converter.value.subject.name.strategy`
: Determines how to construct the subject name under which the value schema is registered with Schema Registry.
  <br/>
  * Type: string
  * Default: TopicNameStrategy
  * Importance: low

## Frequently asked questions

Find answers to frequently asked questions about the RabbitMQ Sink connector for Confluent Cloud.

### Why is the connector failing with authentication errors?

Authentication failures can occur due to incorrect credentials or network issues. Verify the following:

* Ensure `rabbitmq.username` and `rabbitmq.password` are correct and have proper permissions on the RabbitMQ server.
* Check that your RabbitMQ user has write permissions to the specified exchange.
* If using SSL/TLS, verify that your certificates are valid and properly configured.
* Review the connector logs in the Cloud Console for specific error messages.

### Why does the connector fail to connect to the RabbitMQ server?

Connection failures can have multiple causes. Check the following:

* Verify network connectivity between Confluent Cloud and your RabbitMQ server. See [Networking and DNS](overview.md#connect-internet-access-resources) for networking requirements.
* Ensure your RabbitMQ host and port are correct.
* Check firewall rules to allow traffic from Confluent Cloud connector IP addresses. See [Public Egress IP Addresses for Confluent Cloud Connectors](static-egress-ip.md#cc-static-egress-ips) if you need to allowlist specific IP addresses.
* Confirm the RabbitMQ server is running and accepting connections.

### How can I improve throughput and performance of the connector?

To optimize the connector performance:

* **Increase tasks**: Set `tasks.max` to a higher value. More tasks enable parallel processing and can improve throughput.
* **Adjust batch size**: Increase `rabbitmq.publish.max.batch.size`. Larger batches can improve throughput but may increase latency.
* **Monitor lag**: Check consumer lag in the Cloud Console to identify bottlenecks.

#### NOTE
`rabbitmq.publish.max.batch.size` works in conjunction with `consumer.max.poll.records` and will always be smaller than that value.

### How does batching work with this connector?

The connector batches records from Kafka before publishing to RabbitMQ:

* The `rabbitmq.publish.max.batch.size` property controls the maximum number of messages in a batch.
* Batching reduces the number of network calls to RabbitMQ and can improve overall throughput.
* The batch size does not override consumer-level configurations.
* All batching configurations prefixed with `rabbitmq.publish` work together to influence throughput.

### Why is my `RUNNING` connector not sending data to RabbitMQ?

If the connector is running but not sending data to RabbitMQ, check the following:

* Verify that your Kafka topics contain data and the connector is reading from the correct topics.
* Check the RabbitMQ exchange name and routing key configuration.
* Confirm the RabbitMQ exchange exists and is properly configured.
* Review connector metrics to see if records are being consumed from Kafka.
* Check for errors in the DLQ topic.
* Verify that your data format is compatible with the connector’s byte array conversion.

### How do I recover a connector from a `FAILED` state?

Follow these steps to diagnose and resolve failures:

1. **Check error message**: Review the error message in the connector status page. This often indicates the specific issue (authentication, connection, configuration).
2. **Verify prerequisites**:
   * Confirm RabbitMQ server is accessible from Confluent Cloud.
   * Verify credentials and permissions are correct.
   * Check that exchange name and routing key are valid.
   * Ensure SSL/TLS configuration is correct if using secure connections.
3. **Test configuration**: Verify network connectivity using tools like `telnet` or `nc` from a host in the same network path.
4. **Restart connector**: After fixing configuration issues, restart the connector from the Cloud Console.
5. **Contact Support**: If issues persist after verifying configuration and connectivity, contact [Confluent Support](https://support.confluent.io) with:
   * Connector ID
   * Cluster ID
   * Error messages from the connector status page
   * Configuration details excluding sensitive credentials

### Why can’t I see detailed connector logs in the Cloud Console?

For security and privacy reasons, Confluent Cloud does not expose all connector logs in the UI. You can view:

* **Connector status**: Overall state such as `Running`, `Failed`, and `Paused`.
* **Task status**: Individual task states and high-level error messages.
* **Error messages**: Summary error messages for validation and runtime failures.

For detailed troubleshooting:

* Review the error messages displayed in the connector status page.
* Check configuration validation errors during connector creation.
* Monitor connector metrics and consumer lag in the Cloud Console.
* Contact [Confluent Support](https://support.confluent.io) for access to detailed logs for troubleshooting.

## Next Steps

For an example that shows fully managed Confluent Cloud connectors in action with
Confluent Cloud for Apache Flink, see the [Cloud ETL Demo](/platform/current/tutorials/examples/cloud-etl/docs/index.html).
This example also shows how to use Confluent CLI to manage your resources in
Confluent Cloud.

[![image](images/topology.png)](https://docs.confluent.io/platform/current/tutorials/examples/cloud-etl/docs/index.html)
