Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdc: add claim check raw value format doc #18903

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion ticdc/ticdc-sink-to-kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -531,4 +531,21 @@ If the message contains the `claimCheckLocation` field, the Kafka consumer reads
}
```

The `key` and `value` fields contain the encoded large message, which should have been sent to the corresponding field in the Kafka message. Consumers can parse the data in these two parts to restore the content of the large message.
The `key` and `value` fields corresponds to the same fields in the Kafka message. Consumers can parse the data in these two parts to restore the content of the large message, by encoding the `key` and `value` into one JSON object to deliver a complete message. Only Open-protocol encode the `key` field, it's empty for other protocols.

#### Only send the value to external storage

Starting from version v8.4.0, the `claim-check-raw-value` parameter is supported, and it defaults to false. It can be set to true if not using Open-protocol, otherwise error occurs.

An example configuration is as follows:

```toml
protocol = "simple"

[sink.kafka-config.large-message-handle]
large-message-handle-option = "claim-check"
claim-check-storage-uri = "s3://claim-check-bucket"
claim-check-raw-value = true
```

When this parameter is set to true, the changefeed directly sends the Value portion of Kafka messages to external storage, on the consumer side, data can be read directly from external storage and consumed. This reduce CPU overhead introduced by the JSON serialization and deserialization.
Loading