pub struct AvroEncoderConfig {
pub update_format: AvroUpdateFormat,
pub key_mode: Option<AvroEncoderKeyMode>,
pub schema: Option<String>,
pub cdc_field: Option<String>,
pub namespace: Option<String>,
pub subject_name_strategy: Option<SubjectNameStrategy>,
pub skip_schema_id: bool,
pub registry_config: AvroSchemaRegistryConfig,
}Expand description
Avro output format configuration.
Fields§
§update_format: AvroUpdateFormatFormat used to encode data change events in this stream.
The default value is raw.
key_mode: Option<AvroEncoderKeyMode>Determines how the message key is generated when the Avro encoder is configured
in the raw mode.
The default is key_fields when the index property of the connector is configured and none otherwise.
schema: Option<String>Avro schema used to encode output records.
When specified, the encoder will use this schema; otherwise it will automatically generate an Avro schema based on the SQL view definition.
Specified as a string containing schema definition in JSON format. This schema must match precisely the SQL view definition, modulo nullability of columns.
cdc_field: Option<String>Optional name of the field used for Change Data Capture (CDC) annotations.
Use this setting with data sinks that expect operation type (insert, delete, or update) encoded as a column in the Avro record, such as the Iceberg Sink Kafka Connector.
When set (e.g., "cdc_field": "op"), the specified field will be added to each record
to indicate the type of change:
"I"for insert operations"U"for upserts"D"for deletions
If not set, CDC metadata will not be included in the records.
Only works with the raw update format.
namespace: Option<String>Avro namespace for the generated Avro schemas.
subject_name_strategy: Option<SubjectNameStrategy>Subject name strategy used to publish Avro schemas used by the connector in the schema registry.
When this property is not specified, the connector chooses subject name strategy automatically:
topic_nameforconfluent_jdbcupdate formatrecord_nameforrawupdate format
skip_schema_id: boolSet to true if serialized messages should only contain raw data
without the header carrying schema ID.
False by default.
registry_config: AvroSchemaRegistryConfigSchema registry configuration.
When configured, the connector will push the Avro schema, whether it is specified as part of connector configuration or generated automatically, to the schema registry and use the schema id assigned by the registry in the
Trait Implementations§
Source§impl Clone for AvroEncoderConfig
impl Clone for AvroEncoderConfig
Source§fn clone(&self) -> AvroEncoderConfig
fn clone(&self) -> AvroEncoderConfig
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more