Class SchemaResolverConfig

java.lang.Object
io.apicurio.registry.resolver.SchemaResolverConfig

public class SchemaResolverConfig extends Object
Contains the DefaultSchemaResolver configuration properties.
Author:
eric.wittmann@gmail.com, Fabian Martinez
  • Field Details

    • ARTIFACT_RESOLVER_STRATEGY

      public static final String ARTIFACT_RESOLVER_STRATEGY
      Fully qualified Java classname of a class that implements ArtifactReferenceResolverStrategy and 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 by SchemaResolver.resolveSchema(io.apicurio.registry.resolver.data.Record)
      See Also:
    • ARTIFACT_RESOLVER_STRATEGY_DEFAULT

      public static final String ARTIFACT_RESOLVER_STRATEGY_DEFAULT
      Uses the ArtifactReference available for each record. Requires Metadata.artifactReference() to be set. Note this default artifact resolver strategy differs in behavior from the classic Kafka serdes ArtifactResolverStrategy
    • AUTO_REGISTER_ARTIFACT

      public static final String 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

      public static final String AUTO_REGISTER_ARTIFACT_IF_EXISTS
      Optional, one of IfExists to 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

      public static final String AUTO_REGISTER_ARTIFACT_IF_EXISTS_DEFAULT
    • FIND_LATEST_ARTIFACT

      public static final String 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 via ArtifactReferenceResolverStrategy or via config properties such as EXPLICIT_ARTIFACT_ID.
      See Also:
    • FIND_LATEST_ARTIFACT_DEFAULT

      public static final boolean FIND_LATEST_ARTIFACT_DEFAULT
      See Also:
    • CACHE_LATEST

      public static final String CACHE_LATEST
      If true, 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

      public static final String FAULT_TOLERANT_REFRESH
      If true, 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

      public static final String EXPLICIT_ARTIFACT_GROUP_ID
      Only applicable for serializers Optional, set explicitly the groupId used for querying/creating an artifact. Overrides the groupId returned by the ArtifactReferenceResolverStrategy
      See Also:
    • EXPLICIT_ARTIFACT_ID

      public static final String EXPLICIT_ARTIFACT_ID
      Only applicable for serializers Optional, set explicitly the artifactId used for querying/creating an artifact. Overrides the artifactId returned by the ArtifactReferenceResolverStrategy
      See Also:
    • SCHEMA_LOCATION

      public static final String 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

      public static final String EXPLICIT_ARTIFACT_VERSION
      Only applicable for serializers Optional, set explicitly the version used for querying/creating an artifact. Overrides the version returned by the ArtifactReferenceResolverStrategy
      See Also:
    • REGISTRY_URL

      public static final String REGISTRY_URL
      The URL of the Apicurio Registry. Required when using any Apicurio Registry serde class (serializer or deserializer).
      See Also:
    • AUTH_TOKEN_ENDPOINT

      public static final String 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

      public static final String 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

      public static final String AUTH_SERVICE_URL_TOKEN_ENDPOINT
      See Also:
    • AUTH_REALM

      public static final String AUTH_REALM
      The Realm of the Auth Service.
      See Also:
    • AUTH_CLIENT_ID

      public static final String AUTH_CLIENT_ID
      The Client Id of the Auth Service.
      See Also:
    • AUTH_CLIENT_SECRET

      public static final String AUTH_CLIENT_SECRET
      The Secret of the Auth Service.
      See Also:
    • AUTH_CLIENT_SCOPE

      public static final String AUTH_CLIENT_SCOPE
      The Scope of the Auth Service.
      See Also:
    • AUTH_USERNAME

      public static final String AUTH_USERNAME
      The Username of the Auth Service.
      See Also:
    • AUTH_PASSWORD

      public static final String AUTH_PASSWORD
      The Password of the Auth Service.
      See Also:
    • CHECK_PERIOD_MS

      public static final String 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

      public static final String 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

      public static final String 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

      public static final String 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

      public static final String REQUEST_TRUSTSTORE_LOCATION
      Location of a trust store to use when connecting to the registry via SSL.
      See Also:
    • REQUEST_TRUSTSTORE_TYPE

      public static final String REQUEST_TRUSTSTORE_TYPE
      Type of trust store to use when connecting to the registry via SSL.
      See Also:
    • REQUEST_TRUSTSTORE_PASSWORD

      public static final String REQUEST_TRUSTSTORE_PASSWORD
      Password of the trust store to use when connecting to the registry via SSL.
      See Also:
    • REQUEST_KEYSTORE_LOCATION

      public static final String REQUEST_KEYSTORE_LOCATION
      Location of a keystore to use when e.g. connecting to the registry via mTLS.
      See Also:
    • REQUEST_KEYSTORE_TYPE

      public static final String REQUEST_KEYSTORE_TYPE
      Type of keystore to use when e.g. connecting to the registry via mTLS.
      See Also:
    • REQUEST_KEYSTORE_PASSWORD

      public static final String REQUEST_KEYSTORE_PASSWORD
      Password of the keystore to use when e.g. connecting to the registry via mTLS.
      See Also:
    • REQUEST_KEY_PASSWORD

      public static final String REQUEST_KEY_PASSWORD
      Key password used when e.g. connecting to the registry via mTLS.
      See Also:
    • DEREFERENCE_SCHEMA

      public static final String DEREFERENCE_SCHEMA
      Used to indicate the auto-register feature to try to dereference the schema before registering it in Registry. Only applicable when AUTO_REGISTER_ARTIFACT is enabled.
      See Also:
    • DEREFERENCE_SCHEMA_DEFAULT

      public static final boolean DEREFERENCE_SCHEMA_DEFAULT
      See Also:
  • Constructor Details

    • SchemaResolverConfig

      public SchemaResolverConfig()