Class SerdeConfig
java.lang.Object
io.apicurio.registry.resolver.config.AbstractConfig
io.apicurio.registry.resolver.config.SchemaResolverConfig
io.apicurio.registry.serde.config.SerdeConfig
- Direct Known Subclasses:
SerdeDeserializerConfig
Contains all of the Serde configuration properties. These are all the property names used when configuring
serde classes in Kafka apps via a
Properties object. Serde classes can be used by creating them
directly as well, in which case these property names are not relevant.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringUses the ArtifactReference available for each record.static final StringTTL in seconds for the cached contract ruleset.static final longstatic final StringBoolean used to enable or disable contract rule execution during serialization/deserialization.static final booleanstatic final StringBoolean used to control whether contract rule failures cause serialization/deserialization to fail.static final booleanstatic final StringBoolean used to enable inline schema migration during deserialization.static final booleanstatic final StringThe target schema version for migration.static final StringFully qualified Java classname of a class that will be used as the return type for the deserializer.static final StringFully qualified Java classname of a class that will be used as the return type for the deserializer.static final StringOnly applicable for deserializers Optional, set explicitly the groupId used as fallback for resolving the artifact used for deserialization.static final StringOnly applicable for deserializers Optional, set explicitly the artifactId used as fallback for resolving the artifact used for deserialization.static final StringOnly applicable for deserializers Optional, allows to set a custom implementation ofFallbackArtifactProvider, for resolving the artifact used for deserialization.static final Stringstatic final StringOnly applicable for deserializers Optional, set explicitly the version used as fallback for resolving the artifact used for deserialization.static final StringFully qualified Java classname of a class that implementsIdHandlerand is responsible for writing the schema's Global ID to the message payload.static final Stringstatic final StringProperty used internally to mark that a component is being configured for a kafka message key.static final StringBoolean used to enable or disable reading the protobuf schema message indexes when reading the proto message as a payload.static final booleanstatic final StringBoolean used to enable or disable reading the type ref (either in message headers or payload) when deserializing a Protobuf message.static final booleanstatic final StringFully qualified Java classname of a class that implementsSchemaResolver.static final Stringstatic final StringBoolean used to enable or disable sending the protobuf schema message indexes when writing the proto message as a payload.static final booleanstatic final StringBoolean used to enable or disable sending the type ref (either in message headers or payload) when serializing a Protobuf message.static final booleanstatic final StringConfigures the serdes to use the specifiedIdOptionas the identifier for the artifacts.static final Stringstatic final StringBoolean used to enable or disable validation.static final booleanFields inherited from class io.apicurio.registry.resolver.config.SchemaResolverConfig
ARTIFACT_RESOLVER_STRATEGY, AUTH_CLIENT_ID, AUTH_CLIENT_SCOPE, AUTH_CLIENT_SECRET, AUTH_PASSWORD, AUTH_TOKEN_ENDPOINT, AUTH_USERNAME, AUTO_REGISTER_ARTIFACT, AUTO_REGISTER_ARTIFACT_DEFAULT, AUTO_REGISTER_ARTIFACT_IF_EXISTS, AUTO_REGISTER_ARTIFACT_IF_EXISTS_DEFAULT, BACKGROUND_REFRESH_ENABLED, BACKGROUND_REFRESH_ENABLED_DEFAULT, BACKGROUND_REFRESH_EXECUTOR_THREADS, BACKGROUND_REFRESH_EXECUTOR_THREADS_DEFAULT, BACKGROUND_REFRESH_TIMEOUT_MS, BACKGROUND_REFRESH_TIMEOUT_MS_DEFAULT, CACHE_LATEST, CACHE_LATEST_DEFAULT, CANONICALIZE, CANONICALIZE_DEFAULT, CHECK_PERIOD_MS, CHECK_PERIOD_MS_DEFAULT, DEREFERENCE_DEFAULT, DEREFERENCE_SCHEMA, EXPLICIT_ARTIFACT_GROUP_ID, EXPLICIT_ARTIFACT_ID, EXPLICIT_ARTIFACT_VERSION, FAULT_TOLERANT_REFRESH, FAULT_TOLERANT_REFRESH_DEFAULT, FIND_LATEST_ARTIFACT, FIND_LATEST_ARTIFACT_DEFAULT, HTTP_ADAPTER, HTTP_ADAPTER_DEFAULT, OTEL_ENABLED, OTEL_ENABLED_DEFAULT, PROXY_HOST, PROXY_PASSWORD, PROXY_PORT, PROXY_USERNAME, REGISTRY_URL, REGISTRY_URL_VERSION, RETRY_BACKOFF_MS, RETRY_BACKOFF_MS_DEFAULT, RETRY_COUNT, RETRY_COUNT_DEFAULT, SCHEMA_LOCATION, TLS_CERTIFICATES, TLS_TRUST_ALL, TLS_TRUST_ALL_DEFAULT, TLS_TRUSTSTORE_LOCATION, TLS_TRUSTSTORE_PASSWORD, TLS_TRUSTSTORE_TYPE, TLS_TRUSTSTORE_TYPE_DEFAULT, TLS_VERIFY_HOST, TLS_VERIFY_HOST_DEFAULT, USAGE_TELEMETRY_CLIENT_ID, VERTX_INSTANCEFields inherited from class io.apicurio.registry.resolver.config.AbstractConfig
originals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class io.apicurio.registry.resolver.config.SchemaResolverConfig
autoRegisterArtifact, autoRegisterArtifactIfExists, findLatest, getArtifactResolverStrategy, getAuthClientId, getAuthClientScope, getAuthClientSecret, getAuthPassword, getAuthUsername, getBackgroundRefresh, getBackgroundRefreshExecutorThreads, getBackgroundRefreshTimeout, getCacheLatest, getCheckPeriod, getExplicitArtifactGroupId, getExplicitArtifactId, getExplicitArtifactVersion, getExplicitSchemaLocation, getFaultTolerantRefresh, getHttpAdapter, getProxyHost, getProxyPassword, getProxyPort, getProxyUsername, getRegistryUrl, getRegistryUrlVersion, getRetryBackoff, getRetryCount, getTlsCertificates, getTlsTrustAll, getTlsTruststoreLocation, getTlsTruststorePassword, getTlsTruststoreType, getTlsVerifyHost, getTokenEndpoint, getUsageTelemetryClientId, getVertx, isCanonicalize, isOtelEnabled, resolveDereferencedMethods inherited from class io.apicurio.registry.resolver.config.AbstractConfig
getBoolean, getBooleanOrFalse, getClass, getDurationNonNegativeMillis, getLongNonNegative, getObject, getString, getStringOneOf, originals
-
Field Details
-
SCHEMA_RESOLVER
Fully qualified Java classname of a class that implementsSchemaResolver.DefaultSchemaResolveris used by default. The SchemaResolver is used both by Serializer and Deserializer classes.- See Also:
-
SCHEMA_RESOLVER_DEFAULT
-
ARTIFACT_RESOLVER_STRATEGY_DEFAULT
Uses the ArtifactReference available for each record. RequiresMetadata.artifactReference()to be set. -
IS_KEY
Property used internally to mark that a component is being configured for a kafka message key.- See Also:
-
ID_HANDLER
Fully qualified Java classname of a class that implementsIdHandlerand is responsible for writing the schema's Global ID to the message payload.- See Also:
-
ID_HANDLER_DEFAULT
-
USE_ID
Configures the serdes to use the specifiedIdOptionas the identifier for the artifacts. Instructs the serializer to write the specified id into the kafka records and instructs the deserializer to read and use the specified id from the kafka records (to find the schema).- See Also:
-
USE_ID_DEFAULT
-
VALIDATION_ENABLED
Boolean used to enable or disable validation. Not applicable to all serde classes. For example, the JSON Schema serde classes use this to enable or disable JSON Schema validation (unlike Avro, the JSON Schema schema is not required to serialize/deserialize the message payload).- See Also:
-
VALIDATION_ENABLED_DEFAULT
public static final boolean VALIDATION_ENABLED_DEFAULT- See Also:
-
SEND_TYPE_REF
Boolean used to enable or disable sending the type ref (either in message headers or payload) when serializing a Protobuf message.- See Also:
-
SEND_TYPE_REF_DEFAULT
public static final boolean SEND_TYPE_REF_DEFAULT- See Also:
-
READ_TYPE_REF
Boolean used to enable or disable reading the type ref (either in message headers or payload) when deserializing a Protobuf message.- See Also:
-
READ_TYPE_REF_DEFAULT
public static final boolean READ_TYPE_REF_DEFAULT- See Also:
-
SEND_INDEXES
Boolean used to enable or disable sending the protobuf schema message indexes when writing the proto message as a payload.- See Also:
-
SEND_INDEXES_DEFAULT
public static final boolean SEND_INDEXES_DEFAULT- See Also:
-
READ_INDEXES
Boolean used to enable or disable reading the protobuf schema message indexes when reading the proto message as a payload. When enabled, the deserializer will assume that the message indexes (array) is present in the payload buffer before the serialized message data.- See Also:
-
READ_INDEXES_DEFAULT
public static final boolean READ_INDEXES_DEFAULT- See Also:
-
FALLBACK_ARTIFACT_GROUP_ID
Only applicable for deserializers Optional, set explicitly the groupId used as fallback for resolving the artifact used for deserialization.- See Also:
-
FALLBACK_ARTIFACT_ID
Only applicable for deserializers Optional, set explicitly the artifactId used as fallback for resolving the artifact used for deserialization.- See Also:
-
FALLBACK_ARTIFACT_VERSION
Only applicable for deserializers Optional, set explicitly the version used as fallback for resolving the artifact used for deserialization.- See Also:
-
FALLBACK_ARTIFACT_PROVIDER
Only applicable for deserializers Optional, allows to set a custom implementation ofFallbackArtifactProvider, for resolving the artifact used for deserialization.- See Also:
-
FALLBACK_ARTIFACT_PROVIDER_DEFAULT
-
DESERIALIZER_SPECIFIC_KEY_RETURN_CLASS
Fully qualified Java classname of a class that will be used as the return type for the deserializer. Aplicable for keys deserialization. Forces the deserializer to return objects of this type, if not present the return type will be obtained from the message headers, if updated by the serializer. Supported by JsonSchema and Protobuf deserializers.- See Also:
-
DESERIALIZER_SPECIFIC_VALUE_RETURN_CLASS
Fully qualified Java classname of a class that will be used as the return type for the deserializer. Aplicable for values deserialization. Forces the deserializer to return objects of this type, if not present the return type will be obtained from the message headers, if updated by the serializer. Supported by JsonSchema and Protobuf deserializers.- See Also:
-
CONTRACT_RULES_ENABLED
Boolean used to enable or disable contract rule execution during serialization/deserialization. When enabled, the serializer executes WRITE-mode rules and the deserializer executes READ-mode rules against the registry's rule execution endpoint.- See Also:
-
CONTRACT_RULES_ENABLED_DEFAULT
public static final boolean CONTRACT_RULES_ENABLED_DEFAULT- See Also:
-
CONTRACT_RULES_FAIL_ON_ERROR
Boolean used to control whether contract rule failures cause serialization/deserialization to fail. When true (default), a rule failure throws an exception. When false, failures are logged as warnings.- See Also:
-
CONTRACT_RULES_FAIL_ON_ERROR_DEFAULT
public static final boolean CONTRACT_RULES_FAIL_ON_ERROR_DEFAULT- See Also:
-
CONTRACT_RULES_CACHE_TTL_SECONDS
TTL in seconds for the cached contract ruleset. When the cache expires, the ruleset is re-fetched from the registry on the next message.- See Also:
-
CONTRACT_RULES_CACHE_TTL_SECONDS_DEFAULT
public static final long CONTRACT_RULES_CACHE_TTL_SECONDS_DEFAULT- See Also:
-
CONTRACT_RULES_MIGRATION_ENABLED
Boolean used to enable inline schema migration during deserialization. When enabled and the record's schema version differs from the target version, UPGRADE/DOWNGRADE transform rules are applied locally.- See Also:
-
CONTRACT_RULES_MIGRATION_ENABLED_DEFAULT
public static final boolean CONTRACT_RULES_MIGRATION_ENABLED_DEFAULT- See Also:
-
CONTRACT_RULES_MIGRATION_TARGET_VERSION
The target schema version for migration. When migration is enabled and the record's version differs from this value, transform rules are applied to reach the target version.- See Also:
-
-
Constructor Details
-
SerdeConfig
-
SerdeConfig
public SerdeConfig()
-
-
Method Details
-
getIdHandler
-
useIdOption
-
getDefaults
- Overrides:
getDefaultsin classSchemaResolverConfig
-