Create a Redis sink connector
Use a Redis sink connector to make the changes captured from your source database available in Redis, where your applications can read them. The connector reads the Kafka topics you choose and stores the records with the Redis command you select.
Prerequisites
- A CDC Service whose status is Healthy. See Create a CDC Service.
- Topics with change data, written by a source connector such as a PostgreSQL source connector.
- The URL, username, and password of your Redis database.
Create the connector
-
Select Data platform → Workspace management, then select your workspace.
-
On the Overview tab, under Services, select the CDC card.
-
Select the Connectors tab, then select Create Connector.

-
On the Connector Information screen, enter a Name, select sink in Type, and select Redis in Database.

-
Select Next Step. On the Properties screen, enter the connection details, then select Test connection. Next Step becomes available after the test succeeds.

-
On the same screen, choose a Converter class and set the four converter fields. Under Kafka topic, select +, then select the topics to read in the Select topics panel.


-
Select Next Step. On the Additional properties screen, set the fields in the Task, Redis config, and Error Tolerance sections.



-
Select Next Step and check the settings on the Review screen.

-
Select Create.
The portal returns to the Essential Information tab of the CDC Service. On the Connectors tab, the new connector shows the status Running, with every Tasks counter at 0 until its task starts, which can take up to about 2.5 minutes.
Connector settings
Connector information
| Field | Required | Description |
|---|---|---|
| Name | Yes | The connector name. Use lowercase letters, digits, and hyphens (-) only. Upper-case letters, _, ., and spaces are rejected with "Name has invalid characters". |
| Type | Yes | Select sink. |
| Database | Yes | Select Redis. |
Properties
This connector has no From FPT Database Engine option. Enter the connection details in the Database Information section. See Connection mode for how Test connection works.
| Field | Required | Description |
|---|---|---|
| URL | Yes | The address of the Redis database, in the form redis://HOST:PORT/DB or rediss://HOST:PORT/DB, where DB is the database number, for example 0. |
| Username | Yes | The username the connector uses to connect to Redis, for example default. |
| Password | Yes | The password for that user. |
| Converter class | Yes | The converter class for this connector. The portal offers Redis. The four converter fields stay greyed out until you choose a class. See Converter. |
| Converter key, Converter key schema enable, Converter value, Converter value schema enable | Yes | How the connector reads the keys and values of the messages, and whether they carry a schema. Converter key and Converter value each offer org.apache.kafka.connect.json.JsonConverter, org.apache.kafka.connect.storage.StringConverter, and org.apache.kafka.connect.converters.ByteArrayConverter. Both schema enable fields offer true and false. |
| Kafka topic | Yes | The topics to read, up to 100. Select + to open the Select topics panel, select the topics, then select Select. See Topics. |
Additional properties
| Field | Required | Description |
|---|---|---|
| Number of task | Yes | The maximum number of tasks that run in parallel. Default 1. See Tasks max. |
| Command | Yes | The Redis command that stores each record: HSET, SET, JSONSET, XADD, RPUSH, or SADD. The field has no default. JSONSET needs the RedisJSON module. |
| Mode (under Error Tolerance) | Yes | What the connector does with a message that it cannot read or convert. None stops the connector with status Failed. All skips the message and sends it to the topic you enter for failed records. The field has no default. See Error tolerance. |