Store Debezium state
Storing state of a Debezium connector
Table of Contents
Overview
Debezium connectors require persistent storage to preserve their state between restarts. All connectors require a mechanism to provide persistent storage for the offsets. In addition, connectors such as Db2, MySQL, Oracle, and SQL Server, require additional storage for their so-called internal schema history, which records changes to table schema in the database.
Offset storage is provided automatically for deployments within the Kafka Connect runtime through one of the following mechanisms:
| Kafka offset store | Provides storage for Kafka Connect distributed. |
|---|---|
| File offset store | Provides storage for Kafka Connect standalone. |
If you run a connector in Debezium Engine or Debezium Server, you must explicitly configure the offset store. For connectors that work with schema-based databases, you configure internal schema history storage by setting connector properties.
Kafka
Debezium can use Kafka to store its state, including source offsets and schema history. Connectors implement KafkaOffsetBackingStore to store offsets in a Kafka topic (for example, connect-offsets). These offsets ensure that after a connector restarts, it is able to resume reading from the correct position. Connectors store their schema history in a separate compacted topic, such as schema-changes.inventory.
Offset Store
| Property | Default | Description |
|---|---|---|
offset.storage | No default | Must be set to org.apache.kafka.connect.storage.KafkaOffsetBackingStore. |
offset.storage.topic | No default | Specifies the Kafka topic where the connector stores its offsets. To ensure that the topic retains the latest offset information, you must enable log compaction for this topic. |
offset.storage.partitions | 25 | Specifies the number of partitions for the offset storage topic. Ensure that the value of this setting aligns with the partitioning strategy of the Kafka cluster. |
offset.storage.replication.factor | 3 | Sets the replication factor for the offset storage topic. Replicating data across multiple brokers improves fault tolerance. |
Internal schema history store
| Property | Default | Description |
|---|---|---|
schema.history.internal | No default | Must be set to io.debezium.storage.kafka.history.KafkaSchemaHistory. |
schema.history.internal.kafka.topic | No default | The name of the topic that stores the database schema history. |
schema.history.internal.kafka.bootstrap.servers | No default | A list of host and port pairs that the connector uses to establish the initial connection to the Kafka cluster to retrieve its database schema history. This value must match the connection settings that the Kafka Connect process uses to connect to the Kafka cluster. |
schema.history.internal.kafka.recovery.poll.interval.ms | 100 | Specifies the time, in milliseconds, that the connector waits between polling requests for persisted data during recovery. |
schema.history.internal.kafka.recovery.attempts | 100 | Specifies the number of consecutive unsuccessful attempts to retrieve schema history data from Kafka that the connector allows. Recovery attempts stop after the number of attempts exceeds this value. The maximum time that the connector waits after it is unable to retrieve data is recovery.attempts x recovery.poll.interval.ms. |
schema.history.internal.kafka.query.timeout.ms | 3 | Specifies the time, in milliseconds, that the connector waits for a response after the Kafka AdminClient submits a request to fetch cluster information before the request times out. |
schema.history.internal.kafka.create.timeout.ms | 30 | Specifies the time, in milliseconds, that the connector waits for a response after the Kafka AdminClient submits a request to create a Kafka history topic before the request times out. |
schema.history.internal.producer.* | No Default | Pass-through properties prefix for configuring how producer clients interact with schema history topics. |
schema.history.internal.consumer.* | No Default | Pass-through properties prefix for configuring how consumer clients interact with schema history topics. |
File
It’s possible to persist the position (offsets) of the connector in a local file on disk. These offsets ensure that after a connector restarts, Debezium can resume reading from the last read position. File storage provides a simple, fast mechanism for storing offsets that is ideal for single-node applications or testing scenarios.
Offset Store
| Property | Default | Description |
|---|---|---|
offset.storage | No default | Must be set to org.apache.kafka.connect.storage.FileOffsetBackingStore |
offset.storage.file.filename | No default | The path to the file where Debezium stores source connector offsets. |
offset.flush.interval.ms | 6000ms | Specifies the time, in milliseconds, between attempts to flush the current offset state to the configured offsets file. |
Internal schema history store
| Property | Default | Description |
|---|---|---|
schema.history.internal | No default | Must be set to io.debezium.storage.file.history.FileSchemaHistory |
schema.history.internal.file | No default | The path to the file where Debezium records the database schema history. |
Memory
MemoryOffsetBackingStore is a volatile, in-memory store that Debezium Embedded uses to track source offsets. Storing offsets in memory preserves the offset state only during the application’s runtime. Offset records are lost if the connector shuts down or crashes. Memory storage is ideal for testing, or for short-lived tasks, but it is not suitable for production environments that require persistent offsets.
Offset Store
| Property | Default | Description |
|---|---|---|
offset.storage | No default | Must be set to org.apache.kafka.connect.storage.MemoryOffsetBackingStore |
Internal schema history store
| Property | Default | Description |
|---|---|---|
schema.history.internal | No default | Must be set to io.debezium.relational.history.MemorySchemaHistory |
JDBC
The store uses an arbitrary relational database to store the offset data. You must provide the JDBC driver for the database. Debezium can store data in the same source database from which it captures events, or you can configure it to use a different database.
Debezium provides pre-configured DML and DDL statements. You can use these default statements, or you can override the defaults with your own statements to provide compatibility with database dialects or to customize them for specific use cases.
Offset Store
| Property | Default | Description |
|---|---|---|
offset.storage | No default | Must be set to io.debezium.storage.jdbc.offset.JdbcOffsetBackingStore. |
offset.storage.jdbc.connection.url | No default | JDBC driver connection string to connect to the database. |
offset.storage.jdbc.connection.user | No default | (Optional) The username through which Debezium connects to the database that stores offset data. |
offset.storage.jdbc.connection.password | No default | (Optional) Password for the user specified by offset.storage.jdbc.connection.user. |
offset.storage.jdbc.connection.wait.retry.delay.ms | 3 seconds | (Optional) Specifies the time, in milliseconds, that the connector waits to retry the connection after failed attempts to connect to the offset storage database. |
offset.storage.jdbc.connection.retry.max.attempts | 5 | (Optional) Specifies the maximum number of times that Debezium retries the connection to the offset storage database after a connection failure. |
offset.storage.jdbc.table.name | debezium_offset_storage | The name of the table where Debezium stores offsets. |
offset.storage.jdbc.table.ddl | Create Query | DDL statement to create the offset table. |
offset.storage.jdbc.table.select | Select query | DML statement that Debezium uses to read offsets values from the table. |
offset.storage.jdbc.table.insert | Insert query | DML statement that Debezium uses to write offsets to the table. |
offset.storage.jdbc.table.delete | Delete query | DML statement that Debezium uses to remove offsets from the table. |
Deprecated configuration prior to 3.2
| Property | Default | Description |
|---|---|---|
offset.storage | No default | Must be set to io.debezium.storage.jdbc.offset.JdbcOffsetBackingStore. |
offset.storage.jdbc.url | No default | JDBC driver connection string to connect to the database. |
offset.storage.jdbc.user | No default | (Optional) The username through which Debezium connects to the database that stores offset data. |
offset.storage.jdbc.password | No default | (Optional) Password for the user specified by offset.storage.jdbc.user. |
offset.storage.jdbc.wait.retry.delay.ms | 3 seconds | (Optional) Specifies the time, in milliseconds, that the connector waits to retry the connection after failed attempts to connect to the offset storage database. |
offset.storage.jdbc.retry.max.attempts | 5 | (Optional) Specifies the maximum number of times that Debezium retries the connection to the offset storage database after a connection failure. |
offset.storage.jdbc.offset.table.name | debezium_offset_storage | The name of the table where Debezium stores offsets. |
offset.storage.jdbc.offset.table.ddl | Create Query | DDL statement to create the offset table. |
offset.storage.jdbc.offset.table.select | Select query | DML statement to read offsets stored from the table. |
offset.storage.offset.table.insert | Insert query | DML statement to write offsets to the table. |
offset.storage.jdbc.offset.table.delete | Delete query | DML statement to remove offsets from the table. |
Offset Table defaults
CREATE TABLE %s (
id VARCHAR(36) NOT NULL,
offset_key VARCHAR(1255),
offset_val VARCHAR(1255),
record_insert_ts TIMESTAMP NOT NULL,
record_insert_seq INTEGER NOT NULL),
PRIMARY KEY (id)SELECT id, offset_key, offset_val FROM %s ORDER BY record_insert_ts, record_insert_seqINSERT INTO %s(id, offset_key, offset_val, record_insert_ts, record_insert_seq)
VALUES ( ?, ?, ?, ?, ? )DELETE FROM %sInternal schema history store
| Property | Default | Description |
|---|---|---|
schema.history.internal | No default | Must be set to io.debezium.storage.jdbc.history.JdbcSchemaHistory. |
schema.history.internal.jdbc.connection.url | No default | JDBC driver connection string to connect to the database. |
schema.history.internal.jdbc.connection.user | No default | (Optional) The username through which Debezium connects to the database that stores schema history data. |
schema.history.internal.jdbc.connection.password | No default | (Optional) Password for the user specified by schema.history.internal.jdbc.connection.user. |
schema.history.internal.jdbc.connection.retry.delay.ms | 3 seconds | (Optional) Specifies the time, in milliseconds, that the connector waits to retry the connection after an attempt to connect to the internal schema history database fails. |
schema.history.internal.jdbc.connection.retry.max.attempts | 5 | (Optional) Specifies the maximum number of times that Debezium retries the connection to the internal schema history database after a connection failure. |
schema.history.internal.jdbc.table.name | debezium_database_history | The name of the table where Debezium stores the internal schema history. |
schema.history.internal.jdbc.table.ddl | Create Query | The DDL statement used to create a table to store the internal schema history. |
schema.history.internal.jdbc.table.select | Select query | The SELECT statement to read schema changes from the internal schema history table. |
schema.history.internal.jdbc.table.exists | Data Exist Query | The SELECT statement that checks for the existence of an internal schema history storage table. |
schema.history.internal.jdbc.table.insert | Insert query | The INSERT statement that records changes to the internal schema history table. |
Deprecated configuration prior to 3.2
| Property | Default | Description |
|---|---|---|
schema.history.internal | No default | Must be set to io.debezium.storage.jdbc.history.JdbcSchemaHistory. |
schema.history.internal.jdbc.url | No default | JDBC driver connection string to connect to the database. |
schema.history.internal.jdbc.user | No default | (Optional) The username through which Debezium connects to the database that stores internal schema history data. |
schema.history.internal.jdbc.password | No default | (Optional) Password for the user specified by schema.history.internal.jdbc.user. |
schema.history.internal.jdbc.retry.delay.ms | 3 seconds | (Optional) Specifies the time, in milliseconds, that the connector waits to retry the connection after an attempt to connect to the internal schema history database fails. |
schema.history.internal.jdbc.retry.max.attempts | 5 | (Optional) Specifies the maximum number of times that Debezium retries the connection to the internal schema history database after a connection failure. |
schema.history.internal.jdbc.schema.history.table.name | debezium_database_history | The name of the table where Debezium stores the internal schema history. |
schema.history.internal.jdbc.schema.history.table.ddl | Create Query | The DDL statement used to create the internal schema history storage table. |
schema.history.internal.jdbc.schema.history.table.select | Select query | The SELECT statement to read schema changes from the internal schema history table. |
schema.history.internal.jdbc.schema.history.table.exists | Data Exist Query | The SELECT statement that checks for the existence of an internal schema history storage table. |
schema.history.internal.jdbc.schema.history.table.insert | Delete query | The INSERT statement that records changes to the internal schema history table. |
History Table defaults
CREATE TABLE %s (
id VARCHAR(36) NOT NULL,
history_data VARCHAR(65000),
history_data_seq INTEGER,
record_insert_ts TIMESTAMP NOT NULL,
record_insert_seq INTEGER NOT NULL,
PRIMARY KEY (id, history_data_seq)
)SELECT id, history_data FROM %s
ORDER BY record_insert_ts, record_insert_seq, id, history_data_seqSELECT * FROM %s LIMIT 1INSERT INTO %s(id, history_data, history_data_seq, record_insert_ts, record_insert_seq) VALUES ( ?, ?, ?, ?, ? )Redis
Debezium can use a Jedis client to store data in a Redis cache.
Debezium can use either a single Redis instance or use Redis Cluster mode:
Single instance mode
Connects to a single Redis server instance.
Cluster mode
Connects to a Redis Cluster for high availability and horizontal scaling.
To enable Redis Cluster mode, set the redis.cluster.enabled property to true and provide comma-separated host:port addresses in the redis.address property.
Offset Store
| Property | Default | Description |
|---|---|---|
offset.storage | No default | Must be set to io.debezium.storage.redis.offset.RedisOffsetBackingStore |
offset.storage.redis.key | metadataoffsets | The Redis key that Debezium uses to store offsets. |
offset.storage.redis.address | No default | The URL through which Debezium connects to Redis to store offset data. |
offset.storage.redis.user | No default | The user account through which Debezium connects to Redis to store offset data. |
offset.storage.redis.password | No default | The password for the user account through which Debezium connects to Redis to store offset data. |
offset.storage.redis.db.index | 0 | The database index (0—15) that Debezium uses to access Redis to store offset data. |
offset.storage.redis.ssl.enabled | false | Specifies whether Debezium uses SSL when communicating with Redis to store offset data. |
offset.storage.redis.ssl.hostname.verification.enabled | false | Specifies whether Debezium has hostname verification enabled when communicating with Redis to store offset data. |
offset.storage.redis.ssl.truststore.path | No default | The path to the trust store file used for SSL/TLS connections to Redis for offset storage. If set, Redis connections will use this property over other configuration or system properties. |
offset.storage.redis.ssl.truststore.password | No default | The password for the trust store file used for SSL/TLS connections to Redis for offset storage. If set, Redis connections will use this property over other configuration or system properties. |
offset.storage.redis.ssl.truststore.type | JKS | The type of the trust store file used for SSL/TLS connections to Redis for offset storage. If set, Redis connections will use this property over other configuration or system properties. |
offset.storage.redis.ssl.keystore.path | No default | The path to the key store file used for SSL/TLS connections to Redis for offset storage. If set, Redis connections will use this property over other configuration or system properties. |
offset.storage.redis.ssl.keystore.password | No default | The password for the key store file used for SSL/TLS connections to Redis for offset storage. If set, Redis connections will use this property over other configuration or system properties. |
offset.storage.redis.ssl.keystore.type | JKS | The type of the key store file used for SSL/TLS connections to Redis for offset storage. |
offset.storage.redis.connection.timeout.ms | 2000 | Specifies the time, in milliseconds, that Debezium waits to establish a connection to Redis before the connection times out. |
offset.storage.redis.socket.timeout.ms | 2000 | Specifies the interval, in milliseconds, that Debezium allows for exchanging offset data with Redis before the socket times out. If a data packet is not transferred with the specified interval, Debezium closes the socket. |
offset.storage.redis.retry.initial.delay.ms | 300 | Specifies the time, in milliseconds, that Debezium waits to retry the connection after an initial attempt to connect to Redis fails. |
offset.storage.redis.retry.max.delay.ms | 10000 | Specifies the maximum time, in milliseconds, that Debezium waits to retry the connection after an attempt to connect to Redis fails. |
offset.storage.redis.retry.max.attempts | 10 | Specifies the maximum number of times that Debezium retries the connection to Redis after connection attempts fail. |
offset.storage.redis.wait.enabled | false | In Redis environments that are configured to use a replica shard, specifies whether Debezium waits for Redis to verify that it wrote data to the replica. |
offset.storage.redis.wait.timeout.ms | 1000 | Specifies a time, in milliseconds, that Debezium waits for confirmation that Redis wrote data to a replica shard before the request times out. |
offset.storage.redis.wait.retry.enabled | false | Specifies whether Debezium retries failed requests to confirm whether data is written to a replica shard. |
offset.storage.redis.wait.retry.delay.ms | 1000 | Specifies the time, in milliseconds, that Debezium waits after a failure before it resubmits a request to Redis to confirm data is written to a replica shard. |
offset.storage.redis.cluster.enabled | false | If you configure Debezium Server to store offsets in Redis, set this property to specify whether to use Redis Cluster mode. Set the value to true to configure Debezium to use a JedisCluster client to route offset data to Redis nodes. |
Internal schema history store
| Property | Default | Description |
|---|---|---|
schema.history.internal | No default | Must be set to io.debezium.storage.redis.history.RedisSchemaHistory |
schema.history.internal.redis.key | metadataschema_history | The Redis key that Debezium uses to store the schema history data. |
schema.history.internal.redis.address | No default | The URL through which Debezium connects to Redis to store schema history data. |
schema.history.internal.redis.user | No default | The user account through which Debezium connects to Redis to store schema history data. |
schema.history.internal.redis.password | No default | The password for the user account through which Debezium connects to Redis to store schema history data. |
schema.history.internal.redis.db.index | 0 | The database index (0—15) that Debezium uses to access Redis to store schema history data. |
schema.history.internal.storage.redis.ssl.enabled | false | Specifies whether Debezium uses SSL when communicating with Redis to store schema history data. |
schema.history.internal.storage.redis.ssl.hostname.verification.enabled | false | Specifies whether Debezium has hostname verification enabled when communicating with Redis to store schema history data. |
schema.history.internal.storage.redis.ssl.truststore.path | No default | The path to the trust store file used for SSL/TLS connections to Redis to store schema history data. |
schema.history.internal.storage.redis.ssl.truststore.password | No default | The password for the trust store file used for SSL/TLS connections to Redis to store schema history data. |
schema.history.internal.storage.redis.ssl.truststore.type | JKS | The type of the trust store file used for SSL/TLS connections to Redis to store schema history data. |
schema.history.internal.storage.redis.ssl.keystore.path | No default | The path to the key store file used for SSL/TLS connections to Redis to store schema history data. |
schema.history.internal.storage.redis.ssl.keystore.password | No default | The password for the key store file used for SSL/TLS connections to Redis to store schema history data. |
schema.history.internal.storage.redis.ssl.keystore.type | JKS | The type of the key store file used for SSL/TLS connections to Redis to store schema history data. |
schema.history.internal.storage.redis.connection.timeout.ms | 2000 | Specifies the time, in milliseconds, that Debezium waits to establish a connection to Redis before the connection times out. |
schema.history.internal.storage.redis.socket.timeout.ms | 2000 | Specifies the interval, in milliseconds, that Debezium allows for exchanging schema history data with Redis. If a data packet is not transferred with the specified interval, Debezium closes the socket. |
schema.history.internal.storage.redis.retry.initial.delay.ms | 300 | Specifies the time, in milliseconds, that Debezium waits to retry the connection after an initial attempt to connect to Redis fails. |
schema.history.internal.storage.redis.retry.max.delay.ms | 10000 | Specifies the maximum time, in milliseconds, that Debezium waits to retry the connection after an attempt to connect to Redis fails. |
schema.history.internal.storage.redis.retry.max.attempts | 10 | Specifies the maximum number of times that Debezium retries the connection to Redis after connection attempts fail. |
schema.history.internal.storage.redis.wait.enabled | false | In Redis environments that are configured to use a replica shard, specifies whether Debezium waits for Redis to verify that it wrote data to the replica. |
schema.history.internal.storage.redis.wait.timeout.ms | 1000 | Specifies the time, in milliseconds, that Debezium waits for confirmation that Redis wrote data to a replica shard before the request times out. |
schema.history.internal.storage.redis.wait.retry.enabled | false | Specifies whether Debezium retries failed requests to confirm whether data is written to a replica shard. |
schema.history.internal.storage.redis.wait.retry.delay.ms | 1000 | Specifies the time, in milliseconds, that Debezium waits after a failure before it resubmits a request to Redis to confirm data is written to a replica shard. |
schema.history.internal.storage.redis.cluster.enabled | false | If you configure Debezium Server to store schema history in Redis, set this property to specify whether to use Redis Cluster mode. Set the value to true to configure Debezium to use a JedisCluster client to route history data to Redis nodes. |
Redis Configuration Examples
Single Instance Mode
# Offset storage configuration
offset.storage=io.debezium.storage.redis.offset.RedisOffsetBackingStore
offset.storage.redis.address=localhost:6379
offset.storage.redis.password=password
offset.storage.redis.cluster.enabled=false
# Schema history storage configuration
schema.history.internal=io.debezium.storage.redis.history.RedisSchemaHistory
schema.history.internal.storage.redis.address=localhost:6379
schema.history.internal.storage.redis.password=password
schema.history.internal.storage.redis.cluster.enabled=falseCluster Mode
# Offset storage configuration
offset.storage=io.debezium.storage.redis.offset.RedisOffsetBackingStore
offset.storage.redis.address=redis-node-1:7001,redis-node-2:7002,redis-node-3:7003
offset.storage.redis.password=password
offset.storage.redis.cluster.enabled=true
# Schema history storage configuration
schema.history.internal=io.debezium.storage.redis.history.RedisSchemaHistory
schema.history.internal.storage.redis.address=redis-node-1:7001,redis-node-2:7002,redis-node-3:7003
schema.history.internal.storage.redis.password=password
schema.history.internal.storage.redis.cluster.enabled=true| If you configure Debezium to use Redis Cluster mode, ensure that your Redis Cluster is properly configured and accessible. The Debezium Server instance must be able to communicate with the cluster nodes. |
|---|
Amazon S3
Debezium can use the Amazon S3 object storage service. Typically, you would use S3 storage when you deploy Debezium with Amazon Managed Streaming for Apache Kafka (Amazon MSK).
Internal schema history store
Property Default Description
No default
Must be set to io.debezium.storage.s3.history.S3SchemaHistory.
schema.history.internal.s3.access.key.id
No default
(Optional) The identifier of the static access key that Debezium uses to authenticate with S3.
schema.history.internal.s3.secret.access.key
No default
(Optional) The Amazon Web Services (AWS) secret key that Debezium uses to authenticate to S3.
schema.history.internal.s3.region.name
No default
(Optional) Specifies the name of the region that hosts the S3 bucket.
schema.history.internal.s3.bucket.name
No default
Specifies the name of the S3 bucket that stores the schema history.
schema.history.internal.s3.object.name
No default
Specifies the object name in the bucket that stores the schema history.
schema.history.internal.s3.endpoint
No default
(Optional) Specifies a custom URL that Debezium uses to access the S3 service.
Provide the URL in the following format: http://<server>:<port>;
Azure Blob Storage
Debezium can use the Azure Blob storage service to store data. Typically, you would use Azure Blob storage when you deploy Debezium in the Apache Kafka in Azure HDInsight service.
Internal schema history store
| Property | Default | Description |
|---|---|---|
schema.history.internal | No default | Must be set to io.debezium.storage.azure.blob.history.AzureBlobSchemaHistory. |
schema.history.internal.azure.storage.account.connectionstring | No default | Specifies the Azure Blob storage connection string. |
schema.history.internal.azure.storage.account.name | No default | The name of the account that Debezium uses to connect to Azure. |
schema.history.internal.azure.storage.account.blob.endpoint | No default | An optional Azure Blob Storage account endpoint URL. Use this to override the default public endpoint (https://<account>.blob.core.windows.net) for sovereign clouds such as Azure Government (https://<account>.blob.core.usgovcloudapi.net) or Azure China (https://<account>.blob.core.chinacloudapi.cn). Only used when schema.history.internal.azure.storage.account.connectionstring is not set. Should not be set together with schema.history.internal.azure.storage.account.name. |
schema.history.internal.azure.storage.account.container.name | No default | The name of the Azure container in which Debezium stores data. |
schema.history.internal.azure.storage.blob.name | No default | The name of the blob where Debezium stores data. |
RocketMQ
Debezium can use the RocketMqSchemaHistory class to store and retrieve database schema changes in Apache RocketMQ.
Internal schema history store
| Property | Default | Description |
|---|---|---|
schema.history.internal | No default | Must be set to io.debezium.storage.rocketmq.history.RocketMqSchemaHistory. |
schema.history.internal.rocketmq.topic | No Default | The name of the RocketMQ topic where Debezium stores the database schema history. |
schema.history.internal.rocketmq.name.srv.addr | No Default | Specifies the host and port where the Apache RocketMQ NameServer discovery service is available. |
schema.history.internal.rocketmq.acl.enabled | false | Specifies whether to enable access control lists in RocketMQ. |
schema.history.internal.rocketmq.access.key | No Default | Specifies the RocketMQ access key. This field must include a value if schema.history.internal.rocketmq.acl.enabled is set to true. |
schema.history.internal.rocketmq.secret.key | No Default | Specifies the RocketMQ secret key. This field must include a value if schema.history.internal.rocketmq.acl.enabled is set to true. |
schema.history.internal.rocketmq.recovery.attempts | No Default | Specifies the number of consecutive attempts in which RocketMQ returns no data before recovery completes. |
schema.history.internal.rocketmq.recovery.poll.interval.ms | No Default | Specifies the time, in milliseconds, that Debezium waits after each poll attempt to recover the history. |
schema.history.internal.rocketmq.store.record.timeout.ms | No Default | Specifies the time, in milliseconds, that Debezium waits for a write to Rocket MQ to complete before the operation times out. |
Chronicle Queue
Debezium connectors buffer change events in an internal queue before delivering them to the runtime framework. By default, Debezium uses an in-memory bounded queue. You can replace the default queue with a Chronicle Queue backed implementation by setting the queue.provider.type connector property. Chronicle Queue writes events to memory-mapped files on disk, reducing heap pressure during high-throughput periods.
Two Chronicle Queue implementations are available:
chronicle
Spills all change events to disk. This removes events from the JVM heap entirely, which is useful when you expect sustained high throughput and want to minimize garbage collection overhead.
hybrid_chronicle
Uses an in-memory queue as the primary buffer and spills overflow to disk when the buffer reaches its capacity. In low-traffic scenarios, no serialization or disk I/O occurs.
| Chronicle Queue does not support operating off any network-based file system. This includes NFS, AFS, SAN-based storage, or similar. The reason for this is those systems do not provide all the required primitives for memory-mapped files. If any networking is needed to make the files accessible to the host(s), then Chronicle Queue cannot be used. |
|---|
JVM setup
When using the debezium/server or debezium/connect container images, all the required JVM setups will be configured for you by setting the environment variable ENABLE_CHRONICLE_QUEUE to true.
When using other deployment alternatives, Chronicle Queue’s access to several internal JVM APIs must be explicitly provided by your configuration. This requires specifying the following JVM startup arguments, which grants Chronicle Queue reflective access to core Java internals required for its off-heap memory management and low-latency operations.
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMEDChronicle Queue provider
To use the chronicle provider, set queue.provider.type to chronicle.
| Property | Default | Description |
|---|---|---|
queue.provider.type | memory | Must be set to chronicle. |
chronicle.queue.path | No default | (Optional) The directory path where Chronicle Queue stores its data files. If not set, Debezium creates a temporary directory that is cleaned up when the connector stops. |
Hybrid Chronicle Queue provider
To use the hybrid_chronicle provider, set queue.provider.type to hybrid_chronicle.
The in-memory buffer holds the most recent events up to the capacity defined by max.queue.size. When the buffer reaches capacity, the oldest event is evicted to disk before a new event is added. When polling, Debezium drains evicted events from Chronicle Queue first, then from the in-memory buffer, preserving strict FIFO ordering.
| Property | Default | Description |
|---|---|---|
queue.provider.type | memory | Must be set to hybrid_chronicle. |
chronicle.queue.path | No default | (Optional) The directory path where Chronicle Queue stores its data files. If not set, Debezium creates a temporary directory that is cleaned up when the connector stops. |
The in-memory buffer capacity for the hybrid_chronicle provider is controlled by the connector’s existing max.queue.size property. |
|---|
评论
登录后参与评论
KnowForge