Class KafkaProtobufSerializer<T extends com.google.protobuf.Message>
java.lang.Object
io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe
io.confluent.kafka.serializers.protobuf.AbstractKafkaProtobufSerializer<T>
io.confluent.kafka.serializers.protobuf.KafkaProtobufSerializer<T>
- All Implemented Interfaces:
SerializerWithSchema<T>,Closeable,AutoCloseable,org.apache.kafka.common.ClusterResourceListener,org.apache.kafka.common.serialization.Serializer<T>
public class KafkaProtobufSerializer<T extends com.google.protobuf.Message>
extends AbstractKafkaProtobufSerializer<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.protobuf.AbstractKafkaProtobufSerializer
autoRegisterSchema, idCompatStrict, latestCompatStrict, normalizeSchema, onlyLookupReferencesBySchema, propagateSchemaTags, referenceSubjectNameStrategy, schemaFormat, skipKnownTypes, useSchemaGuid, useSchemaId, 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.KafkaProtobufSerializer(SchemaRegistryClient client, Map<String, ?> props) KafkaProtobufSerializer(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.protobuf.AbstractKafkaProtobufSerializer
configure, resolveDependencies, resolveDependencies, resolveDependencies, resolveDependencies, serializeImpl, serializeImpl, serializerConfigMethods 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
-
KafkaProtobufSerializer
public KafkaProtobufSerializer()Constructor used by Kafka producer. -
KafkaProtobufSerializer
-
KafkaProtobufSerializer
-
KafkaProtobufSerializer
-
-
Method Details
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.serialization.Serializer<T extends com.google.protobuf.Message>
-
serialize
- Specified by:
serializein interfaceorg.apache.kafka.common.serialization.Serializer<T extends com.google.protobuf.Message>
-
serialize
- Specified by:
serializein interfaceorg.apache.kafka.common.serialization.Serializer<T extends com.google.protobuf.Message>
-
serialize
public byte[] serialize(String topic, org.apache.kafka.common.header.Headers headers, T record, ParsedSchema schema) - Specified by:
serializein interfaceSerializerWithSchema<T extends com.google.protobuf.Message>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.kafka.common.serialization.Serializer<T extends com.google.protobuf.Message>- Overrides:
closein classAbstractKafkaSchemaSerDe
-