<a id="redis-sink-connector-config"></a>

# Configuration Reference for Redis Sink Connector for Confluent Platform

To use this connector, specify the name of the connector class in the `connector.class` configuration property.

```properties
connector.class=com.github.jcustenborder.kafka.connect.redis.RedisSinkConnector
```

The Redis Sink connector supports storing raw bytes or strings in Redis. If
your keys and values in Kafka records are already serialized as strings, use the
`StringConverter` with this connector to store the record key and value in
Redis as strings:

```properties
key.converter=org.apache.kafka.connect.converters.StringConverter
value.converter=org.apache.kafka.connect.converters.StringConverter
```

Otherwise, use the `ByteArrayConverter` with this connector to store the
binary serialized form (for example, JSON, Avro, strings, etc.) of the Kafka record keys
and values in Redis as byte arrays. Applications accessing these values can then
read this information from Redis and deserialize the bytes into a useable form.
If your data in Kafka is not in the format you want to persist in Redis, consider
using a [Single Message Transformation](/platform/current/connect/transforms/index.html)
to convert the data to a byte array or string before it’s written to Redis.

Note also that this connector expects non-null keys. Each Kafka record in
exported topics must have an explicit key and value.

Connector-specific configuration properties are described below.

#### NOTE
These are properties for the self-managed connector. If you are using
Confluent Cloud, see [Redis Sink Connector for Confluent
Cloud](/cloud/current/connectors/cc-redis-sink.html).

`redis.hosts`
: The Redis hosts to connect to.
  <br/>
  * Type: list
  * Default: [localhost:6379]
  * Importance: high

`redis.client.mode`
: The client mode to use when interacting with the Redis cluster.
  <br/>
  * Type: string
  * Default: Standalone
  * Importance: medium
  * Valid values: `Standalone`, `Cluster`

`redis.database`
: Redis database to connect to.
  <br/>
  * Type: int
  * Default: 1
  * Importance: medium

`redis.operation.timeout.ms`
: The amount of time in milliseconds before an operation is marked as timed out.
  <br/>
  * Type: long
  * Default: 10000
  * Importance: medium
  * Valid values: [100,…]

`redis.password`
: Password used to connect to Redis.
  <br/>
  * Type: password
  * Default: [hidden]
  * Importance: medium

`redis.ssl.enabled`
: Flag to determine if SSL is enabled.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: medium

`redis.ssl.keystore.password`
: The password for the SSL keystore.
  <br/>
  * Type: password
  * Default: [hidden]
  * Importance: medium

`redis.ssl.keystore.path`
: The path to the SSL keystore.
  <br/>
  * Type: string
  * Importance: medium

`redis.ssl.truststore.password`
: The password for the SSL truststore.
  <br/>
  * Type: password
  * Default: [hidden]
  * Importance: medium

`redis.ssl.truststore.path`
: The path to the SSL truststore.
  <br/>
  * Type: string
  * Importance: medium

`redis.auto.reconnect.enabled`
: Flag to determine if the Redis client should automatically reconnect.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: low

`redis.charset`
: The character set to use for String key and values.
  <br/>
  * Type: string
  * Default: UTF-8
  * Importance: low
  * Valid values: `Big5`, `Big5-HKSCS`, `CESU-8`, `EUC-JP`, `EUC-KR`, `GB18030`, `GB2312`, `GBK`, `IBM-Thai`, `IBM00858`, `IBM01140`, `IBM01141`, `IBM01142`, `IBM01143`, `IBM01144`, `IBM01145`, `IBM01146`, `IBM01147`, `IBM01148`, `IBM01149`, `IBM037`, `IBM1026`, `IBM1047`, `IBM273`, `IBM277`, `IBM278`, `IBM280`, `IBM284`, `IBM285`, `IBM290`, `IBM297`, `IBM420`, `IBM424`, `IBM437`, `IBM500`, `IBM775`, `IBM850`, `IBM852`, `IBM855`, `IBM857`, `IBM860`, `IBM861`, `IBM862`, `IBM863`, `IBM864`, `IBM865`, `IBM866`, `IBM868`, `IBM869`, `IBM870`, `IBM871`, `IBM918`, `ISO-2022-CN`, `ISO-2022-JP`, `ISO-2022-JP-2`, `ISO-2022-KR`, `ISO-8859-1`, `ISO-8859-13`, `ISO-8859-15`, `ISO-8859-2`, `ISO-8859-3`, `ISO-8859-4`, `ISO-8859-5`, `ISO-8859-6`, `ISO-8859-7`, `ISO-8859-8`, `ISO-8859-9`, `JIS_X0201`, `JIS_X0212-1990`, `KOI8-R`, `KOI8-U`, `Shift_JIS`, `TIS-620`, `US-ASCII`, `UTF-16`, `UTF-16BE`, `UTF-16LE`, `UTF-32`, `UTF-32BE`, `UTF-32LE`, `UTF-8`, `X-UTF-32BE-BOM`, `X-UTF-32LE-BOM`, `windows-1250`, `windows-1251`, `windows-1252`, `windows-1253`, `windows-1254`, `windows-1255`, `windows-1256`, `windows-1257`, `windows-1258`, `windows-31j`, `x-Big5-HKSCS-2001`, `x-Big5-Solaris`, `x-COMPOUND_TEXT`, `x-EUC-TW`, `x-IBM1006`, `x-IBM1025`, `x-IBM1046`, `x-IBM1097`, `x-IBM1098`, `x-IBM1112`, `x-IBM1122`, `x-IBM1123`, `x-IBM1124`, `x-IBM1364`, `x-IBM1381`, `x-IBM1383`, `x-IBM300`, `x-IBM33722`, `x-IBM737`, `x-IBM833`, `x-IBM834`, `x-IBM856`, `x-IBM874`, `x-IBM875`, `x-IBM921`, `x-IBM922`, `x-IBM930`, `x-IBM933`, `x-IBM935`, `x-IBM937`, `x-IBM939`, `x-IBM942`, `x-IBM942C`, `x-IBM943`, `x-IBM943C`, `x-IBM948`, `x-IBM949`, `x-IBM949C`, `x-IBM950`, `x-IBM964`, `x-IBM970`, `x-ISCII91`, `x-ISO-2022-CN-CNS`, `x-ISO-2022-CN-GB`, `x-JIS0208`, `x-JISAutoDetect`, `x-Johab`, `x-MS932_0213`, `x-MS950-HKSCS`, `x-MS950-HKSCS-XP`, `x-MacArabic`, `x-MacCentralEurope`, `x-MacCroatian`, `x-MacCyrillic`, `x-MacDingbat`, `x-MacGreek`, `x-MacHebrew`, `x-MacIceland`, `x-MacRoman`, `x-MacRomania`, `x-MacSymbol`, `x-MacThai`, `x-MacTurkish`, `x-MacUkraine`, `x-PCK`, `x-SJIS_0213`, `x-UTF-16LE-BOM`, `x-euc-jp-linux`, `x-eucJP-Open`, `x-iso-8859-11`, `x-mswin-936`, `x-windows-50220`, `x-windows-50221`, `x-windows-874`, `x-windows-949`, `x-windows-950`, `x-windows-iso2022jp`

`redis.request.queue.size`
: The maximum number of queued requests to Redis.
  <br/>
  * Type: int
  * Default: 2147483647
  * Importance: low

`redis.socket.connect.timeout.ms`
: The amount of time in milliseconds to wait before timing out a socket when connecting.
  <br/>
  * Type: int
  * Default: 10000
  * Importance: low

`redis.socket.keep.alive.enabled`
: Flag to enable a keepalive to Redis.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`redis.socket.tcp.no.delay.enabled`
: Flag to enable TCP no delay should be used.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: low

`redis.ssl.provider`
: The SSL provider to use.
  <br/>
  * Type: string
  * Default: JDK
  * Importance: low
  * Valid values: `OPENSSL`, `JDK`

<!-- WARNING: THIS IS A SHARED FILE AND THE SOURCE IS LOCATED IN DOCS-COMMON. DO NOT ADD TO ANY OTHER REPO. -->

## CSFLE and CSPE configurations

`csfle.enabled`

Accepts a boolean value. CSFLE is enabled for the connector if `csfle.enabled` is set to True.

* Type: boolean
* Default: False

`auto.register.schemas`

Specifies if the Serializer should attempt to register the Schema with Schema Registry.

* Type: boolean
* Default: true
* Importance: medium

`use.latest.version`

Only applies when `auto.register.schemas` is set to false. If `auto.register.schemas` is set to false and `use.latest.version` is set to true, then instead of deriving a schema for the object passed to the client for serialization, Schema Registry uses the latest version of the schema in the subject for serialization.

* Type: boolean
* Default: true
* Importance: medium
