Package io.apicurio.registry.resolver
Class SchemaResolverConfig
java.lang.Object
io.apicurio.registry.resolver.SchemaResolverConfig
Contains the
DefaultSchemaResolver configuration properties.- Author:
- eric.wittmann@gmail.com, Fabian Martinez
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFully qualified Java classname of a class that implementsArtifactReferenceResolverStrategyand is responsible for mapping between the Record being resolved and an artifactId.static final StringUses the ArtifactReference available for each record.static final StringThe Client Id of the Auth Service.static final StringThe Scope 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 StringIftrue, will cache schema lookups that either have `latest` or no version specified.static final booleanstatic final StringIndicates how long to cache artifacts before auto-eviction.static final longstatic final StringUsed to indicate the auto-register feature to try to dereference the schema before registering it in Registry.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 StringIftrue, will log exceptions instead of throwing them when an error occurs trying to refresh a schema in the cache.static final booleanstatic 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 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 StringOnly applicable for serializers Optional, set explicitly the schema location in the classpath for the schema to be used for serializing the data. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ARTIFACT_RESOLVER_STRATEGY
Fully qualified Java classname of a class that implementsArtifactReferenceResolverStrategyand is responsible for mapping between the Record being resolved and an artifactId. For example there is a strategy to use the topic name as the schema's artifactId. Only used bySchemaResolver.resolveSchema(io.apicurio.registry.resolver.data.Record)- See Also:
-
ARTIFACT_RESOLVER_STRATEGY_DEFAULT
Uses the ArtifactReference available for each record. RequiresMetadata.artifactReference()to be set. Note this default artifact resolver strategy differs in behavior from the classic Kafka serdes ArtifactResolverStrategy -
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 viaArtifactReferenceResolverStrategyor via config properties such asEXPLICIT_ARTIFACT_ID.- See Also:
-
FIND_LATEST_ARTIFACT_DEFAULT
public static final boolean FIND_LATEST_ARTIFACT_DEFAULT- See Also:
-
CACHE_LATEST
Iftrue, will cache schema lookups that either have `latest` or no version specified. Setting this to false will effectively disable caching for schema lookups that do not specify a version.- See Also:
-
CACHE_LATEST_DEFAULT
public static final boolean CACHE_LATEST_DEFAULT- See Also:
-
FAULT_TOLERANT_REFRESH
Iftrue, will log exceptions instead of throwing them when an error occurs trying to refresh a schema in the cache. This is useful for production situations where a stale schema is better than completely failing schema resolution. Note that this will not impact trying of retries, as retries are attempted before this flag is considered.- See Also:
-
FAULT_TOLERANT_REFRESH_DEFAULT
public static final boolean FAULT_TOLERANT_REFRESH_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 theArtifactReferenceResolverStrategy- 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 theArtifactReferenceResolverStrategy- See Also:
-
SCHEMA_LOCATION
Only applicable for serializers Optional, set explicitly the schema location in the classpath for the schema to be used for serializing the data.- 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 theArtifactReferenceResolverStrategy- 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_CLIENT_SCOPE
The Scope 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:
-
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:
-
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:
-
DEREFERENCE_SCHEMA
Used to indicate the auto-register feature to try to dereference the schema before registering it in Registry. Only applicable whenAUTO_REGISTER_ARTIFACTis enabled.- See Also:
-
DEREFERENCE_SCHEMA_DEFAULT
public static final boolean DEREFERENCE_SCHEMA_DEFAULT- See Also:
-
-
Constructor Details
-
SchemaResolverConfig
public SchemaResolverConfig()
-