Class KafkaJsonSchemaSerializer<T>
java.lang.Object
io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe
io.confluent.kafka.serializers.json.AbstractKafkaJsonSchemaSerializer<T>
io.confluent.kafka.serializers.json.KafkaJsonSchemaSerializer<T>
- All Implemented Interfaces:
SerializerWithSchema<T>,Closeable,AutoCloseable,org.apache.kafka.common.ClusterResourceListener,org.apache.kafka.common.serialization.Serializer<T>
public class KafkaJsonSchemaSerializer<T>
extends AbstractKafkaJsonSchemaSerializer<T>
implements SerializerWithSchema<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe
AbstractKafkaSchemaSerDe.ExtendedSchema, AbstractKafkaSchemaSerDe.Migration, AbstractKafkaSchemaSerDe.SubjectSchema -
Field Summary
Fields inherited from class io.confluent.kafka.serializers.json.AbstractKafkaJsonSchemaSerializer
autoRegisterSchema, envelopeDetection, failUnknownProperties, idCompatStrict, latestCompatStrict, normalizeSchema, objectMapper, oneofForNullables, propagateSchemaTags, scanPackages, specVersion, useSchemaGuid, useSchemaId, validate, validateBeforeDomainRules, validationRulesExecutionFields inherited from class io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe
config, configOriginals, contextNameStrategy, enableRuleServiceLoader, executionEnv, isKey, keySchemaIdDeserializer, keySchemaIdSerializer, keySubjectNameStrategy, latestVersions, latestWithMetadata, metadata, ruleActions, ruleExecutors, schemaRegistry, ticker, useLatestVersion, useSchemaReflection, valueSchemaIdDeserializer, valueSchemaIdSerializer, valueSubjectNameStrategy -
Constructor Summary
ConstructorsConstructorDescriptionConstructor used by Kafka producer.KafkaJsonSchemaSerializer(SchemaRegistryClient client, Map<String, ?> props) KafkaJsonSchemaSerializer(SchemaRegistryClient client, Map<String, ?> props, int cacheCapacity) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidbyte[]byte[]serialize(String topic, org.apache.kafka.common.header.Headers headers, T record, ParsedSchema schema) byte[]Methods inherited from class io.confluent.kafka.serializers.json.AbstractKafkaJsonSchemaSerializer
configure, objectMapper, serializeImpl, serializeImpl, serializerConfig, validateJsonMethods inherited from class io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe
clearKey, configureClientProperties, executeMigrations, executeRules, executeRules, executeRules, executeValidationRules, getById, getBySubjectAndId, getContextName, getContextName, getLatestWithMetadata, getMigrations, getOldSubjectName, getRuleActions, getRuleExecutors, getSchemaById, getSchemaBySchemaId, getSchemaBySubjectAndId, getSchemaEntityBySubjectAndId, getSchemaRegistryClient, getSubjectName, initValidationRuleExecutor, isKey, key, latestVersionsCache, latestWithMetadataCache, lookupLatestVersion, lookupLatestVersion, lookupSchemaByGuid, lookupSchemaBySubjectAndId, lookupSchemaEntityBySubjectAndId, onUpdate, postOp, register, register, register, registerWithResponse, schemaIdDeserializer, schemaIdSerializer, setKey, strategyUsesSchema, ticker, toKafkaException
-
Constructor Details
-
KafkaJsonSchemaSerializer
public KafkaJsonSchemaSerializer()Constructor used by Kafka producer. -
KafkaJsonSchemaSerializer
-
KafkaJsonSchemaSerializer
-
KafkaJsonSchemaSerializer
public KafkaJsonSchemaSerializer(SchemaRegistryClient client, Map<String, ?> props, int cacheCapacity)
-
-
Method Details
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.serialization.Serializer<T>
-
serialize
- Specified by:
serializein interfaceorg.apache.kafka.common.serialization.Serializer<T>
-
serialize
- Specified by:
serializein interfaceorg.apache.kafka.common.serialization.Serializer<T>
-
serialize
public byte[] serialize(String topic, org.apache.kafka.common.header.Headers headers, T record, ParsedSchema schema) - Specified by:
serializein interfaceSerializerWithSchema<T>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.kafka.common.serialization.Serializer<T>- Overrides:
closein classAbstractKafkaSchemaSerDe
-