Skip to content

Latest commit

 

History

History
78 lines (68 loc) · 14.1 KB

File metadata and controls

78 lines (68 loc) · 14.1 KB

Configuration reference

Every property below is read from the Map handed to configure(...), from the Properties given to a facade, or from a Kafka Connect connector configuration. The key names are the constants of AWSSchemaRegistryConstants; their semantics live in GlueSchemaRegistryConfiguration.

"Scope" is the side that reads the property: a producer-only property on a consumer is simply ignored.

Key Type Default Scope Notes
region string default AWS region chain both Configuration fails when neither this nor the provider chain resolves a region.
endpoint string regional Glue endpoint both Endpoint override, mostly for LocalStack and VPC endpoints.
proxyUrl string (URI) none both Rejected with a named error when it is not a valid URI.
registry.name string default-registry serializer The consumer resolves a schema by version id, so it needs no registry name.
schemaName string from the naming strategy serializer The default strategy derives the name from the topic.
schemaNameGenerationClass string (class name) topic-name strategy serializer Must implement AWSSchemaNamingStrategy. An unloadable name falls back to the default strategy.
schemaAutoRegistrationEnabled boolean false serializer When false, an unknown schema fails serialization instead of being registered.
compatibility string (enum) BACKWARD serializer Only read when auto-registration creates the schema. Accepted values: Compatibility.knownValues().
description string DEFAULT-DESCRIPTION-<region>-<registry> serializer Attached to a schema this library registers.
tags Map<String, String> empty serializer Applied when the registry entry is created. Not declared in the Connect ConfigDef — see below.
metadata Map<String, String> none serializer Attached to the schema version. Not declared in the Connect ConfigDef — see below.
compression string (enum) NONE serializer NONE or ZLIB. The consumer reads either: the choice is recorded in the record header.
dataFormat string (enum) none serializer AVRO, JSON or PROTOBUF. A producer on the format-agnostic serializer has to set it; a consumer reads the format from the record header. Each Connect converter accepts only its own format.
avroRecordType string (enum) GENERIC_RECORD deserializer GENERIC_RECORD or SPECIFIC_RECORD. Case-sensitive.
protobufMessageType string (enum) none deserializer DYNAMIC_MESSAGE or POJO. Case-sensitive.
jsonSchemaNullableEnabled boolean false serializer Generates oneOf [null, type] for an optional field when a schema is derived from a POJO. No effect through the Kafka Connect converter, which supplies its own schema. Off by default: it changes the schema text, hence the schema version.
jsonSchemaCompatibilityCheckEnabled boolean false serializer Compares a new JSON schema version against the latest one before registering it, since Glue does not enforce the mode for JSON. Compares the required contract only, under the local mode — limits.
jsonClassNameResolutionEnabled boolean false deserializer Opt-in: it turns a registry field into a class name to load. See className resolution.
jsonClassNameAllowlist list or comma-separated empty deserializer Classes the deserializer may instantiate. com.example.pojos.* scopes one package; a bare * is rejected.
jacksonSerializationFeatures list or comma-separated none both com.fasterxml.jackson.databind.SerializationFeature entries to enable.
jacksonDeserializationFeatures list or comma-separated none both com.fasterxml.jackson.databind.DeserializationFeature entries to enable.
secondaryDeserializer string (class name) or Class none deserializer Fallback for records that carry no Glue Schema Registry header.
timeToLiveMillis long 86400000 (24 h) both Time to live of a cache entry.
cacheSize int 200 both Maximum number of cached schemas.
userAgentApp string default both Reported in the User-Agent of the Glue calls. Ignored by the Connect converters, which always report kafkaconnect.
assumeRoleArn string none Avro Connect converter Role assumed through STS in configure(). The STS client takes region, or the default AWS region chain when that key is unset.
assumeRoleSessionName string kafka-connect-session Avro Connect converter Only read when assumeRoleArn is set.

The three Kafka Connect converters publish these keys through Converter.config(), so PUT /connector-plugins/{plugin}/config/validate reports them, a Connect UI renders them, and an impossible valuecompression=GZIP, dataFormat=AVRO on the JSON converter, an unknown Jackson feature name, a bare * in the allowlist — is refused when the connector is created rather than at the first record. A misspelled key is still ignored in silence: AbstractConfig parses the keys it knows and passes the rest through untouched, which is what lets tags and metadata keep working. The converters also accept the keys of AvroDataConfig (enhanced.avro.schema.support, connect.meta.data, schemas.cache.config) and of JsonSchemaDataConfig (the same two plus decimal.format).

Where a key takes a list, a Connect worker can give it as a comma-separated string: the converters split it before handing it on, so jacksonSerializationFeatures=INDENT_OUTPUT,WRAP_ROOT_VALUE works from a worker properties file.

tags and metadata are deliberately left out of that ConfigDef: their values are maps, a shape Kafka's ConfigDef has no type for. They keep working when a converter is configured programmatically, and a Connect worker could not have passed them anyway.

Limits of the JSON compatibility check

jsonSchemaCompatibilityCheckEnabled compares the definition being registered against the latest version of the schema, on the client, in the producer — one extra GetSchemaVersion call per newly registered definition. Glue is asked for that version and for nothing else, which sets two limits the caller has to work with.

The mode applied is the one configured locally. The check reads the compatibility property, which silently defaults to BACKWARD when the key is absent; the mode the schema carries in Glue is never read. Set compatibility to the mode of the schema in the registry. Otherwise a schema created elsewhere under NONE has changes refused that the registry accepts, and a registry set to FULL is checked backward alone when the local key is absent, which lets a forward-breaking change through.

A transitive mode compares the latest version only. BACKWARD_ALL, FORWARD_ALL and FULL_ALL are checked as BACKWARD, FORWARD and FULL: the comparison is against the latest version of the schema and never against the versions before it, so a change that is compatible with the latest version but breaks an older one passes.