<a id="cc-elasticsearch-service-sink"></a>

# Elasticsearch Service Sink Connector [Deprecated] for Confluent Cloud

#### IMPORTANT
This connector is deprecated and will reach its end of life (EOL) on April 6, 2027.
Confluent recommends migrating to [Elasticsearch Sink V2 connector](cc-elasticsearch-sink-v2/cc-elasticsearch-sink-v2.md#cc-elasticsearch-sink-v2) before the EOL date.
For more information, see [Deprecated and end of life connectors](overview.md#deprecated-connectors).

The fully managed Elasticsearch Service Sink connector for Confluent Cloud moves data
from Apache Kafka® to Elasticsearch.  The connector supports Avro, JSON Schema,
Protobuf, or JSON (schemaless) data output from Apache Kafka® topics. It writes data
from a topic in Kafka to an [Elasticsearch index](https://www.elastic.co/blog/what-is-an-elasticsearch-index). Elasticsearch
is often used for text queries, analytics, and as a key-value store.

The connector supports both the analytics and key-value store use cases. For the
**analytics** use case, each message in Kafka is treated as an event and the
connector uses `topic+partition+offset` as a unique identifier for events, which are then converted to unique documents in Elasticsearch.

For the **key-value store** use case, the connector supports using keys from
Kafka messages as document IDs in Elasticsearch, while providing configurations
that ensure updates to a key are written to Elasticsearch in order. For both use
cases, Elasticsearch’s idempotent write semantics guarantees exactly once
delivery.

All data for a topic have the same type in Elasticsearch. This allows an
independent evolution of schemas for data from different topics. This simplifies
schema evolution because Elasticsearch has one enforcement on mappings; that is,
all fields with the same name in the same index must have the same [mapping type](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html).
By default, index in Elasticsearch is named same as the topic name.

#### NOTE
* This Quick Start is for the fully managed Confluent Cloud connector. If you are
  installing the connector locally for Confluent Platform, see [Elasticsearch Service Sink
  connector for Confluent Platform](https://docs.confluent.io/kafka-connectors/elasticsearch/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 Elasticsearch Service Sink connector inserts Kafka records into an
Elasticsearch index (it supports inserts only).

The connector provides the following features:

* **Database authentication:** Uses Username and password authentication.
* **Input data formats:** The connector supports Avro, JSON Schema, Protobuf, or
  JSON (schemaless) input data formats. [Schema Registry](../get-started/schema-registry.md#cloud-sr-config)
  must be enabled to use a Schema Registry-based format (for example, Avro, JSON_SR (JSON
  Schema), or Protobuf).
* **Select configuration properties:** Provides several optional configuration properties that allow you to fine-tune the connector’s behavior and performance. These properties are described below:
  - `key.ignore`: Whether to ignore the record key for the purpose of forming the Elasticsearch
    document ID. When this is set to `true`, document IDs are created from the topic name,
    partition, and offset (i.e., `topic+partition+offset`).
  - `schema.ignore`: Whether to ignore schemas during indexing. When this property is set
    to `true`, the record schema is ignored and Elasticsearch infers the mapping from the data.
    For this to work, Elasticsearch [dynamic mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-mapping.html) must be
    enabled.
  - `compact.map.entries`: Defines how map entries with string keys in record values should be written to JSON. When this property is set to `true`, the entries are written compactly as ``"entryKey": "entryValue"`. Otherwise, map entries with string keys are written as a nested document (`{"key": "entryKey", "value": "entryValue"}`).
  - `behavior.on.null.values`: How to handle records with a non-null key and a null value (i.e., Kafka tombstone records). Valid options are `ignore`, `delete`, and `fail`. Defaults to `ignore`.
  - `drop.invalid.message`: Whether to drop a Kafka message when it cannot be converted to an output message. Defaults to `false`.
  - `batch.size`: The number of records to process as a batch when writing to Elasticsearch. This value defaults to `2000`.
  - `linger.ms`: Linger time in milliseconds for batching. Records that arrive in between request transmissions are batched into a single bulk indexing request, based on the `batch.size` configuration. Normally this only occurs under load, when records arrive faster than they can be sent out. However, you may want to reduce the number of requests under light load to get the benefits from bulk indexing. In other words, when a pending batch is not full, rather than immediately sending it out the task waits up to the given delay. This allows other records to be added so that they can be batched into a single request. This value defaults to `1000` ms (1 second).
  - `flush.timeout.ms`: The timeout in milliseconds to use for periodic flushing and waiting for buffer space to be made available by completed requests, as records are added. If this timeout is exceeded the task fails. This value defaults to `10000` ms.
  - `connection.compression`: Whether to use Gzip compression on the HTTP connection to ElasticSearch. To make this setting work the `http.compression` setting must be set to `true` on the Elasticsearch nodes. For more information about the Elasticsearch HTTP properties, see [Elasticsearch HTTP Settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#_http_settings). Defaults to `false`.
  - `data.stream.type`: Describes the generic type of data to be written to a data stream. Allowed
    values include `logs`, `metrics`, `none`, and any custom index templates from the
    destination cluster. When set, it will be used in conjunction with `data.stream.dataset` to
    construct the data stream name in the form of
    {`data.stream.type`}-{`data.stream.dataset`}-{`data.stream.namespace`}. The default is `none`,
    which directs the connector to write to regular indices.
* **Topic Mutating SMTs Support**: The connector also supports the following SMTs:
  - `org.apache.kafka.connect.transforms.TimestampRouter`
  - `io.confluent.connect.transforms.MessageTimestampRouter`
  - `io.confluent.connect.transforms.ExtractTopic`
  - `io.confluent.connect.cloud.transforms.TopicRegexRouter`

  For details, see the [Single Message Transformations](single-message-transforms.md#cc-single-message-transforms) documentation.
* **Alias Support**: The connector supports writing to aliases for both indices and data streams. These aliases must be pre-created in Elasticsearch.
* **Supports External topic to resource mapping**: The connector supports external topic to resource mapping, allowing to map Kafka topics to user-defined Elasticsearch resources and write to pre-created indices, data streams, and aliases. It is useful for custom naming schemes and integrating with existing Elasticsearch resources. All resources referenced via `topic.to.external.resource.mapping` (whether index, data stream, or alias) must exist before the connector starts. Each Kafka topic must map to just one Elasticsearch resource; many-to-one or one-to-many mappings aren’t supported.

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 [Elasticsearch Service Sink Connector](limits.md#elasticsearch-service-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).

## Quick Start

Use this quick start to get up and running with the Confluent Cloud Elasticsearch
Service Sink connector. The quick start provides the basics of selecting the
connector and configuring it to stream events to an Elasticsearch deployment.

#### NOTE
The connector only works with the Elasticsearch Service from [Elastic Cloud](https://www.elastic.co/cloud/).

<a id="cc-elasticsearch-service-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.
- The Confluent CLI installed and configured for the cluster. See [Install the Confluent CLI](https://docs.confluent.io/confluent-cli/current/install.html).
- [Schema Registry](../get-started/schema-registry.md#cloud-sr-config) must be enabled to use a Schema Registry-based format (for example, Avro, JSON_SR (JSON Schema), or Protobuf).
- 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).
- The Elasticsearch Service deployment must be in the same region as your Confluent Cloud deployment.
- You add a valid Elasticsearch Service username and password to the connector configuration. You get these when you create your Elastic deployment. An example is shown below:
  ![Elasticsearch Deployment username and password](images/ccloud-elasticsearch-user-pass.png)
- The Elasticsearch Service Sink connector (user) must have the following
  privileges:
  * **Cluster privileges**: `monitor`, `manage`, and `all`
  * **Index privileges**: `create_index`, `read`, `write`, and `view_index_metadata`

- 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.

### 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 **Elasticsearch Service Sink** connector card.

![Elasticsearch Service Sink Connector Card](images/ccloud-elasticsearch-sink-icon.png)

#### Step 4: Enter the connector details

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

At the **Add Elasticsearch Service 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:
   - **Connection URI**: Elasticsearch Service connection URI.
   - **Connection user**: The username used to authenticate with Elasticsearch Service.
   - **Connection password**: The password used to authenticate with Elasticsearch Service.
   - **Enable SSL Security**: Sets authentication support. Set this to
     SSL if you want to enable PKI authentication with SSL support. If
     not set to SSL, the connector ignores all SSL configuration
     properties. Note that the connector will use SSL if HTTPS is used.
   - **SSL Keystore file**: The key store file. This is optional for client and can be used for two-way authentication for client.
   - **Keystore Key Password**: The password of the private key in the key store file. This is required for clients only if two-way authentication is configured.
   - **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.
   - **Keystore file type**: The file format of the key store file. This is optional for client.
   - **SSL Truststore file**: The Truststore file with the certificates of the trusted CAs.
   - **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.
   - **Truststore type**: The file format of the trust store file.
   - **Keymanager algorithm**: The algorithm used by key manager factory for SSL connections.
   - **Trustmanager algorithm**: The algorithm used by trust manager factory for SSL connections.
   - **SSL Endpoint identification algorithm**: The endpoint identification algorithm to validate server hostname using server certificate.
2. Click **Continue**.

### Configuration

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

- **Input Kafka record value format**: Select the input Kafka record value format (data coming from the
  Kafka topic). Valid entries are AVRO, JSON_SR (JSON Schema), PROTOBUF, or JSON (schemaless). A
  valid schema must be available in [Schema Registry](../get-started/schema-registry.md#cloud-sr-config) to use a schema-based message format (for example,
  AVRO, JSON_SR, or PROTOBUF).
- **External Resource Usage**: Select the external resource that the connector writes to.
  Valid options are `INDEX`, `DATASTREAM`, `ALIAS_INDEX`, `ALIAS_DATASTREAM`, `DISABLED`. When set
  to `DISABLED` (default), the connector auto creates indices or datastreams based on topic name and
  datastream configuration.
- **Topic to External Resource Mapping**: Applicable when **External Resource Usage** is set to
  `INDEX`, `DATASTREAM`, `ALIAS_INDEX` or `ALIAS_DATASTREAM`. A list of topic-to-resource
  mappings in the format `topic:resource`. If specified, the connector uses the provided resource name
  (index, data stream, or alias) instead of the topic name for writing to Elasticsearch. The resource
  must exist in Elasticsearch before configuring the connector.The type of resource (index, data stream, or alias)
  is determined by the `external.resource.usage` configuration.
- **Data Stream Type**: Applicable when **External Resource Usage** is set to `DISABLED`.
  Generic type describing the data to be written to data stream. It can be set to any custom index
  templates from the destination cluster. When set to `NONE` (default), the connector writes to
  regular indices.  If set to `LOGS` or `METRICS`, this configuration
  is used with **Data Stream Dataset** to construct the data stream name in the form -
  `{data.stream.type}-{data.stream.dataset}-{data.stream.namespace}`
  (`{data.stream.namespace}` defaults to `${topic}`).
- **Data Stream Dataset**: Applicable when **External Resource Usage** is set to `DISABLED`.
  Generic name describing data ingested and its structure to be written to a data stream.
  You can enter a lowercase string using a maximum of 100 characters. The string must not contain
  spaces or any of these special characters `/\\*\"<>|,#:-`. This configuration is used with
  **Data Stream Type** to construct the data stream name in the form of
  `{data.stream.type}-{data.stream.dataset}-{data.stream.namespace}` (`{data.stream.namespace} defaults to ${topic}`).
  If this property is left blank, the connector writes to regular indices.
- **Data Stream Namespace**: Applicable when **External Resource Usage** is set to `DISABLED`.
  Generic name describing a user-configurable arbitrary grouping for writing to a data stream.
  It can be any string up to 100 characters, in lowercase, without spaces or special characters (`/*"<>|,#:-`).
  If not set, the connector writes to regular indices. When set, it is used with
  **Data Stream Type** and **Data Stream Dataset** to form the data stream name in the format -
  `{data.stream.type}-{data.stream.dataset}-{data.stream.namespace}`. Default is `${topic}`, which means the topic name.
- **Data Stream Timestamp Field**: Applicable when **External Resource Usage** is set to
  `DISABLED`, `DATASTREAM` or `ALIAS_DATASTREAM`. All documents sent to a data stream
  need a `timestamp` field with values of type `date` or `data_nanos`.
  Otherwise, the document won’t be sent.

### **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).
- **Key ignore**: Whether to ignore the record key for the purpose
  of forming the Elasticsearch document ID. When this is set to
  `true`, document IDs are created from the topic name, partition,
  and offset (for example, `topic+partition+offset`).
- **Topics for ‘Ignore Key’ mode**: A list of topics where the key
  is ignored when forming the Elasticsearch document ID. Used when
  **Key ignore** is set to `true`. If no topics are listed in
  this property, the connector ignores keys when processing all
  records.
- **Schema ignore**: Whether to ignore schemas during indexing. When
  this property is set to `true`, the record schema is ignored and
  Elasticsearch infers the mapping from the data. For this to work,
  Elasticsearch [dynamic mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-mapping.html)
  must be enabled. Note that this property must stay set to `false`
  (default) for `JSON` (schemaless).
- **Topics for ‘Ignore Schema’ mode**: A list of topics where the
  record schema is ignored. Used when **Schema ignore** is set to
  `true`. If no topics are listed in this property, the connector
  ignores the schema when processing all records.
- **Compact map entries**: Defines how map entries with string keys
  in record values should be written to JSON. When this property is
  set to `true`, the entries are written compactly as
  ``"entryKey": "entryValue"`. Otherwise, map entries with string
  keys are written as a nested document (`{"key": "entryKey",
  "value": "entryValue"}`).
- **Write Method**: The method the connector uses to write data to
  Elasticsearch. Options are `INSERT` or `UPSERT`. When
  `INSERT` (the default) is used, the connector constructs a
  document from the record value and inserts the document into
  Elasticsearch, completely replacing any existing document with
  the same ID. When `UPSERT` is used, the connector creates a new
  document if one with the specified ID does not exist. If the
  document exists, the connector updates the document with the same
  ID by adding or replacing only those fields present in the record
  value. The `UPSERT` method may require additional Elasticsearch
  time and resources, so consider increasing the **Read Timeout**
  and decreasing the **Batch size** configuration properties.
- **Behavior on null values**: How to handle records with a non-null key and a null value (for example, Kafka tombstone records). Options are `delete`, `fail`, and `ignore` (default).
- **Behavior on malformed documents**: How to handle records that
  Elasticsearch rejects due to the following malformed document
  exception errors:
  - strict_dynamic_mapping_exception
  - mapper_parsing_exception
  - illegal_argument_exception
  - action_request_validation_exception

  `ignore` will skip records with these errors. `fail` will fail
  the connector.

  #### NOTE
  In case of other malformed document errors,
  the connector sends the records to the DLQ along with the exception
  and the connector fails, even if this property is set to `ignore`.
- **Drop invalid message**: Whether to drop a Kafka message when it cannot be converted to an output message. Defaults to `false`.
- **Batch size**: The number of records to process as a batch when writing to Elasticsearch. This value defaults to `2000`.
- **Linger (ms)**: Linger time in milliseconds for batching. Records
  that arrive in between request transmissions are batched into a
  single bulk indexing request, based on the **Batch size** value.
  Normally this only occurs under load, when records arrive faster
  than they can be sent out. However, you may want to reduce the
  number of requests under light load, to get the benefits from bulk
  indexing. In other words, when a pending batch is not full, rather
  than immediately sending it out the task waits up to the given
  delay. This allows other records to be added so that they can be
  batched into a single request. This value defaults to `1000 ms` (1
  second).
- **Flush timeout (ms)**: The timeout in milliseconds to use for
  periodic flushing and waiting for buffer space to be made
  available by completed requests, as records are added. If this
  timeout is exceeded the task fails. This value defaults to `10000`
  ms.
- **Connection compression**: Whether to use Gzip compression on the
  HTTP connection to ElasticSearch. To make this setting work the
  `http.compression` setting must be set to `true` on the
  Elasticsearch nodes. For more information about the Elasticsearch
  HTTP properties, see [Elasticsearch HTTP Settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#_http_settings).
- **Read Timeout**: How long to wait in milliseconds (ms) for the Elasticsearch server to send a response. The task fails if any read operation times out. Defaults to `15000` ms (15 seconds).
- **External Version Header Name**: Header name to pull value for external versioning, defaults to using the Kafka record offset. Must have a numeric value.
- **Elasticsearch Generated IDs**: Specifies whether to use auto-generated Elasticsearch document IDs for insertion requests. Note that this setting removes exactly once guarantees, and message delivery will be at least once. This only applies if the write method is set to `INSERT`. When set to `true`, the `Ignore Key mode` option will also be ignored when sending data to Elasticsearch.

**Additional Configs**

- **value.converter.replace.null.with.default**: Whether to replace fields that have a default value and that are null to the default value. When set to true, the default value is used, otherwise null is used. Applicable for JSON Converter.
- **Value Converter Schema ID Deserializer**: Sets the class name of the schema ID deserializer for values. The deserializer reads schema IDs from message headers.
- **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.schemas.enable**: Include schemas within each of the serialized values. Input messages must contain schema and payload fields and may not contain additional fields. For plain JSON data, set this to false. Applicable for JSON Converter.
- **errors.tolerance**: Use this property if you would like to configure the connector’s error handling behavior. WARNING: This property should be used with CAUTION for SOURCE CONNECTORS as it may lead to dataloss. If you set this property to ‘all’, the connector will not fail on errant records, but will instead log them (and send to DLQ for Sink Connectors) and continue processing. If you set this property to ‘none’, the connector task will fail on errant records.
- **value.converter.ignore.default.for.nullables**: When set to true, this property ensures that the corresponding record in Kafka is NULL, instead of showing the default column value. Applicable for AVRO,PROTOBUF and JSON_SR Converters.
- **Key Converter Schema ID Deserializer**: Sets the class name of the schema ID deserializer for keys. The deserializer reads schema IDs from message headers.
- **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`.
- **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 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.
- **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`.

**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.

**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).

**Processing position**

- **Set offsets**: Click **Set offsets** to define a specific offset for
  this connector to begin procession data from. For more information
  on managing offsets, see [Manage offsets](offsets.md#connect-custom-offsets).

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

- 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.
2. Click **Launch**.
   ![Launch the connector](images/ccloud-elasticsearch-sink-launch-connector.png)

   The status for the connector should go from **Provisioning** to
   **Running**.
   ![Connector running](images/ccloud-elasticsearch-status.png)

#### Step 5: Check the results in Elasticsearch

Verify that new records are being added to your Elasticsearch deployment.

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-elasticsearch-service-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 required and optional connector properties.

```none
{
  "connector.class": "ElasticsearchSink",
  "name": "elasticsearch-connector",
  "kafka.auth.mode": "KAFKA_API_KEY",
  "kafka.api.key": "<my-kafka-api-key",
  "kafka.api.secret": "<my-kafka-api-secret",
  "topics":  "<topic1>, <topic2>"
  "input.data.format": "JSON",
  "connection.url": "<elasticsearch-URI>",
  "connection.username": "<elasticsearch-username>",
  "connection.password": "<elasticsearch-password>",
  "type.name": "<type-name>",
  "key.ignore": "true",
  "schema.ignore": "true",
  "tasks.max": "1"
}
```

Note the following property definitions:

* `"connector.class"`: Identifies the connector plugin name.
* `"name"`: Sets a name for your new connector.

* `"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
  ```

* `"input.data.format"`:  Sets the input Kafka record value format (data coming from the Kafka topic). Valid entries are **AVRO**, **JSON_SR**, **PROTOBUF**, or **JSON**. You must have Confluent Cloud Schema Registry configured if using a schema-based message format (for example, Avro, JSON_SR (JSON Schema), or Protobuf).
* `"connection.url"`: Enter the connection URI. This is the Elasticsearch endpoint you can copy from your Elasticsearch deployment console. The URI you enter should look like this: `https://ec5bfac80bc14c26a77eefb6585f196c.us-west-2.aws.found.io:9243`.
* `"connection.username"` and `"connection.password"` Enter the Elasticsearch deployment username and password. An example showing where these are on the Elastic deployment console is shown in the [prerequisites](#cc-elasticsearch-service-sink-prereqs).
* `"type.name"`: This is a name that Elasticsearch uses when indexing and to divide documents into logical groups. This can be anything you choose (for example, `customer` or `item`). For more information about this property and mapping in general, see [Elasticsearch Mapping: The Basics, Updates & Examples](https://logz.io/blog/elasticsearch-mapping/).

The following are optional properties you can include in the configuration:

* `key.ignore`: Whether to ignore the record key for the purpose of forming the Elasticsearch document ID. When this is set to `true`, document IDs are created from the topic name, partition, and offset (i.e., `topic+partition+offset`). Defaults to `false` if not used.
* `schema.ignore`: Whether to ignore schemas during indexing. When this property is set
  to `true`, the record schema is ignored and Elasticsearch infers the mapping from the data.
  For this to work, Elasticsearch [dynamic mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-mapping.html) must be
  enabled. Defaults to `false` if not used.
* `compact.map.entries`: Defines how map entries with string keys in record values should be written to JSON. When this property is set to `true`, the entries are written compactly as ``"entryKey": "entryValue"`. Otherwise, map entries with string keys are written as a nested document (`{"key": "entryKey", "value": "entryValue"}`). Defaults to `false` if not used.
* `behavior.on.null.values`: How to handle records with a non-null key and a null value (i.e., Kafka tombstone records). Valid options are `ignore`, `delete`, and `fail`. Defaults to `ignore` if not used.
* `drop.invalid.message`: Whether to drop a Kafka message when it cannot be converted to an output message. Defaults to `false` if not used.
* `batch.size`: The number of records to process as a batch when writing to Elasticsearch. This value defaults to `2000` if not used.
* `linger.ms`: Linger time in milliseconds for batching. Records that arrive in between request transmissions are batched into a single bulk indexing request, based on the `batch.size` configuration. Normally this only occurs under load, when records arrive faster than they can be sent out. However, you may want to reduce the number of requests under light load, to get the benefits from bulk indexing. In other words, when a pending batch is not full, rather than immediately sending it out the task waits up to the given delay. This allows other records to be added so that they can be batched into a single request. This value defaults to `1000` ms (1 second) if not used.
* `flush.timeout.ms` The timeout in milliseconds to use for periodic flushing and waiting for buffer space to be made available by completed requests, as records are added. If this timeout is exceeded the task fails. This value defaults to `10000` ms.
* `connection.compression`: Whether to use Gzip compression on the HTTP connection to ElasticSearch. To make this setting work the `http.compression` setting must be set to `true` on the Elasticsearch nodes. For more information about the Elasticsearch HTTP properties, see [Elasticsearch HTTP Settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#_http_settings). Defaults to `false` if not used.

**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 connector, see [Unsupported transformations](single-message-transforms.md#cc-single-message-transforms-unsupported-transforms).

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

#### Step 4: Load the configuration 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 elasticsearch-sink-config.json
```

Example output:

```none
Created connector elasticsearch-connector 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   | elasticsearch-connector    | RUNNING | sink
```

#### Step 6: Check the results in Elasticsearch.

Verify that new records are being added to the Elasticsearch deployment.

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.

## Understanding `external.resource.usage` configuration

The `external.resource.usage` property dictates how the Elasticsearch connector interacts with Elasticsearch resources (indices, data streams, or aliases). Its behavior changes based on its value and the presence of other data stream-related configurations. Consider the following scenarios:

* **When** `external.resource.usage = DISABLED` **(default) and data stream configurations not set**
  : The connector writes to a regular Elasticsearch index, which it automatically creates using the Kafka topic name. This is the default behavior when `external.resource.usage` is disabled and no data stream-specific configurations are provided.
* **When** `external.resource.usage = DISABLED` **and data stream configurations provided**
  : If `external.resource.usage` is `DISABLED` but data stream configurations are provided, the connector automatically creates a data stream named as `{type}-{dataset}-{namespace}` and writes to it. This occurs when:
    * `data.stream.type` is not set to `none`.
    * `data.stream.dataset` is not set to `none`.
    * `data.stream.namespace` (optional) defaults to `${topic}` name if not explicitly set.
    * `data.stream.timestamp.field` (optional) defaults to the Kafka record timestamp if not set.
    <br/>
    The `timestamp.field` is used as the `@timestamp` for indexing; if not set, the Kafka record timestamp is used.
* **When** `external.resource.usage = INDEX` **or** `ALIAS_INDEX`
  : Users must pre-create the target Elasticsearch index or alias-to-index. A one-to-one mapping between Kafka topics and these pre-existing resources must be provided via the `topic.to.external.resource.mapping` configuration (for example, `payments:index-payments`, `logs:alias-logs`). Records from each topic are then written directly to its specified index or index alias.
* **When** `external.resource.usage = DATASTREAM` **or** `ALIAS_DATASTREAM`
  : Users must pre-create the target Elasticsearch data stream or alias-to-data stream. A one-to-one topic-to-resource mapping must be defined via `topic.to.external.resource.mapping` (for example, `metrics:metrics-ds`, `orders:alias-orders-ds`). A common timestamp field must be configured using `data.stream.timestamp.field` (or the Kafka timestamp will be used by default), as all data streams require an `@timestamp` field.

<a id="cc-elasticsearch-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

`errors.deadletterqueue.topic.name`
: The name of the topic to be used as the dead letter queue (DLQ) for messages that result in an error when processed by this sink connector, or its transformations or converters. Defaults to ‘dlq-${connector}’ if not set. The DLQ topic will be created automatically if it does not exist. You can provide `${connector}` in the value to use it as a placeholder for the logical cluster ID.
  <br/>
  * Type: string
  * Default: dlq-${connector}
  * Importance: low

### 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

### Input messages

`input.data.format`
: Sets the input Kafka record value format. Valid entries are AVRO, JSON_SR, PROTOBUF, or JSON. Note that you need to have Confluent Cloud Schema Registry configured if using a schema-based message format like AVRO, JSON_SR, and PROTOBUF.
  <br/>
  * Type: string
  * Default: JSON
  * Importance: high

### 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

### How should we connect to your Elasticsearch Service?

`connection.url`
: Elasticsearch Service connection URI (e.g. [https://123123.us-east-1.aws.found.io:9243](https://123123.us-east-1.aws.found.io:9243)).
  <br/>
  * Type: list
  * Importance: high

`connection.username`
: The username used to authenticate with Elasticsearch Service.
  <br/>
  * Type: string
  * Importance: high

`connection.password`
: The password used to authenticate with Elasticsearch Service.
  <br/>
  * Type: password
  * Importance: high

### Security

`elastic.security.protocol`
: This should be set to SSL if you want to enable PKI auth with SSL support. Otherwise all ssl configs are ignored. Note that the connector will still use SSL if https is used.
  <br/>
  * Type: string
  * Default: PLAINTEXT
  * Importance: medium

`elastic.https.ssl.keystore.file`
: The key store file. This is optional for client and can be used for two-way authentication for client.
  <br/>
  * Type: password
  * Importance: medium

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

`elastic.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: medium

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

`elastic.https.ssl.truststore.file`
: The Truststore file with the certificates of the trusted CAs.
  <br/>
  * Type: password
  * Importance: medium

`elastic.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: medium

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

`elastic.https.ssl.keymanager.algorithm`
: The algorithm used by key manager factory for SSL connections.
  <br/>
  * Type: string
  * Default: SunX509
  * Importance: low

`elastic.https.ssl.trustmanager.algorithm`
: The algorithm used by trust manager factory for SSL connections.
  <br/>
  * Type: string
  * Default: PKIX
  * Importance: low

`elastic.https.ssl.endpoint.identification.algorithm`
: The endpoint identification algorithm to validate server hostname using server certificate.
  <br/>
  * Type: string
  * Default: https
  * Importance: low

### Data Conversion

`key.ignore`
: Whether to ignore the record key for the purpose of forming the Elasticsearch document ID. When this is set to true, document IDs will be generated as topic+partition+offset taken from the record. When this is set to false, the record key will be used as the Elasticsearch document ID.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`topic.key.ignore`
: List of topics for which `key.ignore` should be `true`.
  <br/>
  * Type: list
  * Importance: low

`schema.ignore`
: Whether to ignore schemas during indexing. When this is set to true, the record schema will be ignored for the purpose of registering an Elasticsearch mapping. Elasticsearch will infer the mapping from the data (dynamic mapping needs to be enabled by the user).
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`topic.schema.ignore`
: List of topics for which `schema.ignore` should be `true`.
  <br/>
  * Type: list
  * Importance: low

`compact.map.entries`
: Defines how map entries with string keys within record values should be written to JSON. When this is set to true, these entries are written compactly as “entryKey”: “entryValue”. Otherwise, map entries with string keys are written as a nested document {“key”: “entryKey”, “value”: “entryValue”}.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: low

`write.method`
: Method used for writing data to Elasticsearch, and one of INSERT or UPSERT. The default method is INSERT, in which the connector constructs a document from the record value and inserts that document into Elasticsearch, completely replacing any existing document with the same ID; this matches previous behavior. The UPSERT method will create a new document if one with the specified ID does not yet exist, or will update an existing document with the same ID by adding/replacing only those fields present in the record value. The UPSERT method may require additional time and resources of Elasticsearch, so consider increasing the read.timeout.ms and decreasing the batch.size configuration properties.
  <br/>
  * Type: string
  * Default: INSERT
  * Importance: low

`external.version.header`
: Header name to pull value for external versioning, defaults to using the kafka record offset. Must have a numeric value.
  <br/>
  * Type: string
  * Default: “”
  * Importance: low

`use.autogenerated.ids`
: Specifies whether to use auto-generated Elasticsearch document IDs for insertion requests. Note that this setting removes exactly once guarantees, and message delivery will be at least once. This only applies if the write method is set to INSERT. When set to true, the Ignore Key mode option will also be ignored when sending data to Elasticsearch.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

### Error Handling

`behavior.on.null.values`
: How to handle records with a non-null key and a null value (i.e. Kafka tombstone records). Valid options are ignore, delete, and fail. Ignore will skip the record. Delete will delete the record. Fail will fail the connector.
  <br/>
  * Type: string
  * Default: ignore
  * Importance: low

`behavior.on.malformed.documents`
: How to handle records that Elasticsearch rejects due to some malformation of the document itself, such as an index mapping conflict, a field name containing illegal characters, or a record with a missing id. ‘ignore’ will skip the bad records and ‘fail’ will fail the connector.
  <br/>
  * Type: string
  * Default: fail
  * Importance: low

`drop.invalid.message`
: Whether to drop a record if it cannot be converted to an Elasticsearch document.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

### Connection Details

`batch.size`
: The number of records to process as a batch when writing to Elasticsearch.
  <br/>
  * Type: int
  * Default: 2000
  * Valid Values: [1,…]
  * Importance: medium

`linger.ms`
: Linger time in milliseconds for batching. Records that arrive in between request transmissions are batched into a single bulk indexing request, based on the batch.size configuration. Normally this only occurs under load when records arrive faster than they can be sent out. However, it may be desirable to reduce the number of requests even under light load and benefit from bulk indexing. This setting helps accomplish that - when a pending batch is not full, rather than immediately sending it out the task will wait up to the given delay to allow other records to be added so that they can be batched into a single request.
  <br/>
  * Type: int
  * Default: 1000 (1 second)
  * Valid Values: [1000,…]
  * Importance: low

`flush.timeout.ms`
: The timeout in milliseconds to use for periodic flushing, and when waiting for buffer space to be made available by completed requests as records are added. If this timeout is exceeded the task will fail.
  <br/>
  * Type: int
  * Default: 10000 (10 seconds)
  * Valid Values: [1000,…]
  * Importance: low

`connection.compression`
: Whether to use GZip compression on HTTP connection to ElasticSearch. To make this setting to work the http.compression setting also needs to be enabled at the Elasticsearch nodes before using it.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`read.timeout.ms`
: How long to wait in milliseconds for the Elasticsearch server to send a response. The task fails if any read operation times out.
  <br/>
  * Type: int
  * Default: 15000 (15 seconds)
  * Valid Values: [1000,…,60000]
  * Importance: low

### 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

### External Resource Mapping

`external.resource.usage`
: The type of external resource the connector writes to, such as indices, datastreams or aliases. Valid options are INDEX, DATASTREAM, ALIAS_INDEX, ALIAS_DATASTREAM, and DISABLED. When set to DISABLED, the connector will auto-create indices or datastreams based on the topic name and datastream configurations.
  <br/>
  * Type: string
  * Default: DISABLED
  * Importance: high

`topic.to.external.resource.mapping`
: A list of topic-to-resource mappings in the format ‘topic:resource’. If specified, the connector will use the provided resource name (index, data stream, or alias) instead of the topic name for writing to Elasticsearch. The resource must exist in Elasticsearch before configuring the connector. The type of resource (index, data stream, or alias) is determined by the ‘external.resource.usage’ configuration.
  <br/>
  * Type: list
  * Default: “”
  * Importance: high

### Data Streams

`data.stream.type`
: Describes the generic type of data to be written to a data stream. The default value is none, indicating that the connector will write to regular indices. If set, this configuration will be used alongside data.stream.dataset to construct the data stream name in the form of {`data.stream.type`}-{`data.stream.dataset`}-{`data.stream.namespace`}. Possible values are logs, metrics, none, and custom index templates defined in the destination cluster are also supported.
  <br/>
  * Type: string
  * Default: none
  * Importance: low

`data.stream.dataset`
: Describes the data ingested and its structure to be written to a data stream. This can be any arbitrary string, provided it is no longer than 100 characters, in all lowercase, and does not contain spaces or any special characters `/\*"<>|,#:-`. If no value is set, the connector writes to regular indices. If set, this configuration will be used alongside data.stream.type to construct the data stream name in the form of {`data.stream.type`}-{`data.stream.dataset`}-{`data.stream.namespace`}.
  <br/>
  * Type: string
  * Default: “”
  * Importance: low

`data.stream.namespace`
: Generic name describing a user-configurable arbitrary grouping for writing to a data stream. It can be any string up to 100 characters, in lowercase, without spaces or special characters (/\*”<>|,#:-). If unset, the connector writes to regular indices. When set, it is used with data.stream.type and data.stream.dataset to form the data stream name in the format {data.stream.type}-{data.stream.dataset}-{data.stream.namespace}. Default is ${topic}, which means the topic name.
  <br/>
  * Type: string
  * Default: ${topic}
  * Importance: low

`data.stream.timestamp.field`
: All documents sent to a data stream need an `@timestamp` field with values of type `date` or `date_nanos`. Otherwise, the document  will not be sent. If multiple fields are provided, the first field listed that also appears in the record will be used. If this configuration is left empty, all of the documents will use the Kafka record timestamp as the `@timestamp` field value. Note that `@timestamp` still needs to be explicitly listed if records already contain this field.
  <br/>
  * Type: list
  * Default: “”
  * Importance: low

### 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.scrub.invalid.names`
: Whether to scrub invalid names by replacing invalid characters with valid characters. Applicable for Avro and 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

`errors.tolerance`
: Use this property if you would like to configure the connector’s error handling behavior. WARNING: This property should be used with CAUTION for SOURCE CONNECTORS as it may lead to dataloss. If you set this property to ‘all’, the connector will not fail on errant records, but will instead log them (and send to DLQ for Sink Connectors) and continue processing. If you set this property to ‘none’, the connector task will fail on errant records.
  <br/>
  * Type: string
  * Default: all
  * 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.ignore.default.for.nullables`
: When set to true, this property ensures that the corresponding record in Kafka is NULL, instead of showing the default column value. Applicable for AVRO,PROTOBUF 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.replace.null.with.default`
: Whether to replace fields that have a default value and that are null to the default value. When set to true, the default value is used, otherwise null is used. Applicable for JSON Converter.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: low

`value.converter.schemas.enable`
: Include schemas within each of the serialized values. Input messages must contain schema and payload fields and may not contain additional fields. For plain JSON data, set this to false. Applicable for JSON Converter.
  <br/>
  * Type: boolean
  * Default: false
  * 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

### Auto-restart policy

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

## Suggested Reading

The following blog posts provide data pipeline examples using the Confluent Cloud Elasticsearch Service Sink connector.

* Blog post: [Announcing the Elasticsearch Service Sink connector for Apache Kafka in Confluent Cloud](https://www.confluent.io/blog/managed-kafka-elasticsearch-service-connector-in-confluent-cloud/)
* Blog post: [Analysing Historical and Live Data with ksqlDB and Elastic Cloud](https://www.confluent.io/blog/using-kafka-ksqldb-kibana-to-stream-data-and-get-real-time-analytics/)

## 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)
