Package io.apicurio.registry.serde
Class SerdeConfig
java.lang.Object
io.apicurio.registry.serde.SerdeConfig
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.- Author:
- eric.wittmann@gmail.com, Fabian Martinez
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFully qualified Java classname of a class that implementsArtifactResolverStrategyand is responsible for mapping between the Kafka serde information and an artifactId.static final Stringstatic final StringThe Client Id of the Auth Service.static final StringThe Secret of the Auth Service.static final StringThe Password of the Auth Service.static final StringThe Realm of the Auth Service.static final StringThe URL of the Auth Service.static final Stringstatic final StringThe URL of the Token Endpoint.static final StringThe Username of the Auth Service.static final StringOptional, boolean to indicate whether serializer classes should attempt to create an artifact in the registry.static final booleanstatic final StringOptional, one ofIfExiststo indicate the behavior of the client when there is a conflict creating an artifact because the artifact already exists.static final Stringstatic final StringIndicates how long to cache artifacts before auto-eviction.static final longstatic 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 StringShortcut for enabling the Legacy (Confluent compatible) implementation ofIdHandler.static final StringBoolean to indicate whether serde classes should pass Global Id information via message headers instead of in the message payload.static final booleanstatic final StringOnly applicable for serializers Optional, set explicitly the groupId used for querying/creating an artifact.static final StringOnly applicable for serializers Optional, set explicitly the artifactId used for querying/creating an artifact.static final StringOnly applicable for serializers Optional, set explicitly the version used for querying/creating an artifact.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 StringOptional, boolean to indicate whether serializer classes should attempt to find the latest artifact in the registry for the corresponding groupId/artifactId.static final booleanstatic final StringUsed to override the Kafka message header name used to pass the artifactId for the message key.static final StringUsed to override the Kafka message header name used to pass the contentHash for the message key.static final StringUsed to override the Kafka message header name used to pass the contentId for the message key.static final StringUsed to override the Kafka message header name used to pass the globalId for the message key.static final StringUsed to override the Kafka message header name used to pass the groupId for the message key.static final StringUsed to override the Kafka message header name used to pass the message type for the message key.static final StringUsed to override the Kafka message header name used to pass the version for the message key.static final StringUsed to override the Kafka message header name used to pass the artifactId for the message value.static final StringUsed to override the Kafka message header name used to pass the contentHash for the message value.static final StringUsed to override the Kafka message header name used to pass the contentId for the message value.static final StringUsed to override the Kafka message header name used to pass the globalId for the message value.static final StringUsed to override the Kafka message header name used to pass the groupId for the message value.static final StringUsed to override the Kafka message header name used to pass the message type for the message value.static final StringUsed to override the Kafka message header name used to pass the version for the message value.static final StringFully qualified Java classname of a class that implementsHeadersHandlerand is responsible for writing the schema's Global ID to the message headers.static final Stringstatic 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 StringThe URL of the Apicurio Registry.static final StringConfig prefix that allows configuration of arbitrary HTTP client request headers used by the Registry REST Client in the serde class when communicating with the Registry.static final StringKey password used when e.g.static final StringLocation of a keystore to use when e.g.static final StringPassword of the keystore to use when e.g.static final StringType of keystore to use when e.g.static final StringLocation of a trust store to use when connecting to the registry via SSL.static final StringPassword of the trust store to use when connecting to the registry via SSL.static final StringType of trust store to use when connecting to the registry via SSL.static final StringIf a schema can not be be retrieved from the Registry, serdes may retry a number of times.static final longstatic final StringIf a schema can not be retrieved from the Registry, serdes may retry a number of times.static final longstatic final StringFully qualified Java classname of a class that implementsSchemaResolver.static final Stringstatic 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 boolean -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ARTIFACT_RESOLVER_STRATEGY
Fully qualified Java classname of a class that implementsArtifactResolverStrategyand is responsible for mapping between the Kafka serde information and an artifactId. For example there is a strategy to use the topic name as the schema's artifactId. Only used by the Serializer serde class.- See Also:
-
ARTIFACT_RESOLVER_STRATEGY_DEFAULT
-
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
-
IS_KEY
Property used internally to mark that a component is being configured for a kafka message key.- See Also:
-
AUTO_REGISTER_ARTIFACT
Optional, boolean to indicate whether serializer classes should attempt to create an artifact in the registry. Note: JsonSchema serializer does not support this feature yet.- See Also:
-
AUTO_REGISTER_ARTIFACT_DEFAULT
public static final boolean AUTO_REGISTER_ARTIFACT_DEFAULT- See Also:
-
AUTO_REGISTER_ARTIFACT_IF_EXISTS
Optional, one ofIfExiststo indicate the behavior of the client when there is a conflict creating an artifact because the artifact already exists.- See Also:
-
AUTO_REGISTER_ARTIFACT_IF_EXISTS_DEFAULT
-
FIND_LATEST_ARTIFACT
Optional, boolean to indicate whether serializer classes should attempt to find the latest artifact in the registry for the corresponding groupId/artifactId. GroupId and artifactId are configured either viaArtifactResolverStrategyor via config properties such asEXPLICIT_ARTIFACT_ID.- See Also:
-
FIND_LATEST_ARTIFACT_DEFAULT
public static final boolean FIND_LATEST_ARTIFACT_DEFAULT- See Also:
-
EXPLICIT_ARTIFACT_GROUP_ID
Only applicable for serializers Optional, set explicitly the groupId used for querying/creating an artifact. Overrides the groupId returned by theArtifactResolverStrategy- See Also:
-
EXPLICIT_ARTIFACT_ID
Only applicable for serializers Optional, set explicitly the artifactId used for querying/creating an artifact. Overrides the artifactId returned by theArtifactResolverStrategy- See Also:
-
EXPLICIT_ARTIFACT_VERSION
Only applicable for serializers Optional, set explicitly the version used for querying/creating an artifact. Overrides the version returned by theArtifactResolverStrategy- See Also:
-
REGISTRY_URL
The URL of the Apicurio Registry. Required when using any Apicurio Registry serde class (serializer or deserializer).- See Also:
-
AUTH_TOKEN_ENDPOINT
The URL of the Token Endpoint. Required when using any Apicurio Registry serde class (serializer or deserializer) against a secured Apicurio Registry and AUTH_SERVICE_URL is not specified.- See Also:
-
AUTH_SERVICE_URL
The URL of the Auth Service. Required when using any Apicurio Registry serde class (serializer or deserializer) against a secured Apicurio Registry.- See Also:
-
AUTH_SERVICE_URL_TOKEN_ENDPOINT
- See Also:
-
AUTH_REALM
The Realm of the Auth Service.- See Also:
-
AUTH_CLIENT_ID
The Client Id of the Auth Service.- See Also:
-
AUTH_CLIENT_SECRET
The Secret of the Auth Service.- See Also:
-
AUTH_USERNAME
The Username of the Auth Service.- See Also:
-
AUTH_PASSWORD
The Password of the Auth Service.- 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. Only used whenENABLE_HEADERSis missing or 'false'.- See Also:
-
ID_HANDLER_DEFAULT
-
ENABLE_CONFLUENT_ID_HANDLER
Shortcut for enabling the Legacy (Confluent compatible) implementation ofIdHandler. Should not be used with "ID_HANDLER". The value should be 'true' or 'false'.- See Also:
-
ENABLE_HEADERS
Boolean to indicate whether serde classes should pass Global Id information via message headers instead of in the message payload.- See Also:
-
ENABLE_HEADERS_DEFAULT
public static final boolean ENABLE_HEADERS_DEFAULT- See Also:
-
HEADERS_HANDLER
Fully qualified Java classname of a class that implementsHeadersHandlerand is responsible for writing the schema's Global ID to the message headers. Only used whenENABLE_HEADERSis 'true'.- See Also:
-
HEADERS_HANDLER_DEFAULT
-
CHECK_PERIOD_MS
Indicates how long to cache artifacts before auto-eviction. If not included, the artifact will be fetched every time.- See Also:
-
CHECK_PERIOD_MS_DEFAULT
public static final long CHECK_PERIOD_MS_DEFAULT- See Also:
-
RETRY_COUNT
If a schema can not be retrieved from the Registry, serdes may retry a number of times. This configuration option controls the number of retries before failing. Valid values are non-negative integers.- See Also:
-
RETRY_COUNT_DEFAULT
public static final long RETRY_COUNT_DEFAULT- See Also:
-
RETRY_BACKOFF_MS
If a schema can not be be retrieved from the Registry, serdes may retry a number of times. This configuration option controls the delay between the retry attempts, in milliseconds. Valid values are non-negative integers.- See Also:
-
RETRY_BACKOFF_MS_DEFAULT
public static final long RETRY_BACKOFF_MS_DEFAULT- See Also:
-
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
-
REQUEST_HEADERS_PREFIX
Config prefix that allows configuration of arbitrary HTTP client request headers used by the Registry REST Client in the serde class when communicating with the Registry. For example, this could be used to pass authentication information:apicurio.registry.request.headers.Authorization=BASIC Y2tlbnQ6a3J5cHQwbnIwY2tzIQ==- See Also:
-
REQUEST_TRUSTSTORE_LOCATION
Location of a trust store to use when connecting to the registry via SSL.- See Also:
-
REQUEST_TRUSTSTORE_TYPE
Type of trust store to use when connecting to the registry via SSL.- See Also:
-
REQUEST_TRUSTSTORE_PASSWORD
Password of the trust store to use when connecting to the registry via SSL.- See Also:
-
REQUEST_KEYSTORE_LOCATION
Location of a keystore to use when e.g. connecting to the registry via mTLS.- See Also:
-
REQUEST_KEYSTORE_TYPE
Type of keystore to use when e.g. connecting to the registry via mTLS.- See Also:
-
REQUEST_KEYSTORE_PASSWORD
Password of the keystore to use when e.g. connecting to the registry via mTLS.- See Also:
-
REQUEST_KEY_PASSWORD
Key password used when e.g. connecting to the registry via mTLS.- See Also:
-
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:
-
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:
-
HEADER_KEY_GROUP_ID_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the groupId for the message key. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_KEY_GROUP_ID.- See Also:
-
HEADER_VALUE_GROUP_ID_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the groupId for the message value. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_VALUE_GROUP_ID.- See Also:
-
HEADER_KEY_ARTIFACT_ID_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the artifactId for the message key. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_KEY_ARTIFACT_ID.- See Also:
-
HEADER_VALUE_ARTIFACT_ID_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the artifactId for the message value. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_VALUE_ARTIFACT_ID.- See Also:
-
HEADER_KEY_VERSION_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the version for the message key. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_KEY_VERSION.- See Also:
-
HEADER_VALUE_VERSION_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the version for the message value. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_VALUE_VERSION.- See Also:
-
HEADER_KEY_GLOBAL_ID_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the globalId for the message key. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_KEY_GLOBAL_ID.- See Also:
-
HEADER_VALUE_GLOBAL_ID_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the globalId for the message value. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_VALUE_GLOBAL_ID.- See Also:
-
HEADER_KEY_CONTENT_ID_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the contentId for the message key. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_KEY_CONTENT_ID.- See Also:
-
HEADER_VALUE_CONTENT_ID_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the contentId for the message value. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_VALUE_CONTENT_ID.- See Also:
-
HEADER_KEY_CONTENT_HASH_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the contentHash for the message key. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_KEY_CONTENT_HASH.- See Also:
-
HEADER_VALUE_CONTENT_HASH_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the contentHash for the message value. Only applicable whenENABLE_HEADERSis enabled. Default value isSerdeHeaders.HEADER_VALUE_CONTENT_HASH.- See Also:
-
HEADER_KEY_MESSAGE_TYPE_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the message type for the message key. Only applicable whenENABLE_HEADERSis enabled. Only used by the JSON Schema serde classes. Default value isSerdeHeaders.HEADER_KEY_MESSAGE_TYPE.- See Also:
-
HEADER_VALUE_MESSAGE_TYPE_OVERRIDE_NAME
Used to override the Kafka message header name used to pass the message type for the message value. Only applicable whenENABLE_HEADERSis enabled. Only used by the JSON Schema serde classes. Default value isSerdeHeaders.HEADER_VALUE_MESSAGE_TYPE.- See Also:
-
-
Constructor Details
-
SerdeConfig
public SerdeConfig()
-