Class SerdeConfig

Direct Known Subclasses:
SerdeDeserializerConfig

public class SerdeConfig extends SchemaResolverConfig
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 Details

    • SCHEMA_RESOLVER

      public static final String SCHEMA_RESOLVER
      Fully qualified Java classname of a class that implements SchemaResolver. DefaultSchemaResolver is used by default. The SchemaResolver is used both by Serializer and Deserializer classes.
      See Also:
    • SCHEMA_RESOLVER_DEFAULT

      public static final String SCHEMA_RESOLVER_DEFAULT
    • 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.
    • IS_KEY

      public static final String IS_KEY
      Property used internally to mark that a component is being configured for a kafka message key.
      See Also:
    • ID_HANDLER

      public static final String ID_HANDLER
      Fully qualified Java classname of a class that implements IdHandler and is responsible for writing the schema's Global ID to the message payload.
      See Also:
    • ID_HANDLER_DEFAULT

      public static final String ID_HANDLER_DEFAULT
    • USE_ID

      public static final String USE_ID
      Configures the serdes to use the specified IdOption as 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

      public static final String USE_ID_DEFAULT
    • VALIDATION_ENABLED

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

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

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

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

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

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

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

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

      public static final String FALLBACK_ARTIFACT_PROVIDER
      Only applicable for deserializers Optional, allows to set a custom implementation of FallbackArtifactProvider , for resolving the artifact used for deserialization.
      See Also:
    • FALLBACK_ARTIFACT_PROVIDER_DEFAULT

      public static final String FALLBACK_ARTIFACT_PROVIDER_DEFAULT
    • DESERIALIZER_SPECIFIC_KEY_RETURN_CLASS

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

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

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

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

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

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

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

      public SerdeConfig(Map<String,?> originals)
    • SerdeConfig

      public SerdeConfig()
  • Method Details