pub struct AvroEncoderConfig {
pub update_format: AvroUpdateFormat,
pub schema: Option<String>,
pub namespace: Option<String>,
pub subject_name_strategy: Option<SubjectNameStrategy>,
pub key_fields: Option<Vec<String>>,
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’.
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.
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
key_fields: Option<Vec<String>>When this option is set, only the listed fields appear in the Debezium message key.
This option is only valid with the confluent_jdbc update format.
It is used when writing to a table with primary keys.
For such tables, the Confluent JDBC sink connector expects the message key
(and its schema) to contain only the primary key columns.
When this field is set, the connector generates a separate Avro schema, containing only the listed fields, and uses this schema to encode Kafka message keys.
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