public abstract class AbstractKafkaProtobufSerializer<T extends com.google.protobuf.Message> extends AbstractKafkaSchemaSerDe
AbstractKafkaSchemaSerDe.ExtendedSchema, AbstractKafkaSchemaSerDe.Migration, AbstractKafkaSchemaSerDe.SubjectSchema| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoRegisterSchema |
protected boolean |
idCompatStrict |
protected boolean |
latestCompatStrict |
protected boolean |
normalizeSchema |
protected boolean |
onlyLookupReferencesBySchema |
protected boolean |
propagateSchemaTags |
protected ReferenceSubjectNameStrategy |
referenceSubjectNameStrategy |
protected String |
schemaFormat |
protected boolean |
skipKnownTypes |
protected int |
useSchemaId |
config, configOriginals, contextNameStrategy, DEFAULT_CACHE_CAPACITY, enableRuleServiceLoader, idSize, isKey, keySubjectNameStrategy, latestVersions, latestWithMetadata, MAGIC_BYTE, metadata, ruleActions, ruleExecutors, schemaRegistry, ticker, useLatestVersion, useSchemaReflection, valueSubjectNameStrategy| Constructor and Description |
|---|
AbstractKafkaProtobufSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure(KafkaProtobufSerializerConfig config) |
static ProtobufSchema |
resolveDependencies(SchemaRegistryClient schemaRegistry,
boolean normalizeSchema,
boolean autoRegisterSchema,
boolean propagateSchemaTags,
boolean useLatestVersion,
boolean latestCompatStrict,
Map<AbstractKafkaSchemaSerDe.SubjectSchema,AbstractKafkaSchemaSerDe.ExtendedSchema> latestVersions,
boolean skipKnownTypes,
ReferenceSubjectNameStrategy strategy,
String topic,
boolean isKey,
ProtobufSchema schema)
Resolve schema dependencies recursively.
|
static ProtobufSchema |
resolveDependencies(SchemaRegistryClient schemaRegistry,
boolean normalizeSchema,
boolean autoRegisterSchema,
boolean useLatestVersion,
boolean latestCompatStrict,
Map<AbstractKafkaSchemaSerDe.SubjectSchema,AbstractKafkaSchemaSerDe.ExtendedSchema> latestVersions,
boolean skipKnownTypes,
ReferenceSubjectNameStrategy strategy,
String topic,
boolean isKey,
ProtobufSchema schema) |
static ProtobufSchema |
resolveDependencies(SchemaRegistryClient schemaRegistry,
boolean autoRegisterSchema,
boolean useLatestVersion,
boolean latestCompatStrict,
Map<AbstractKafkaSchemaSerDe.SubjectSchema,AbstractKafkaSchemaSerDe.ExtendedSchema> latestVersions,
boolean skipKnownTypes,
ReferenceSubjectNameStrategy strategy,
String topic,
boolean isKey,
ProtobufSchema schema)
Resolve schema dependencies recursively.
|
static ProtobufSchema |
resolveDependencies(SchemaRegistryClient schemaRegistry,
boolean autoRegisterSchema,
boolean useLatestVersion,
boolean latestCompatStrict,
Map<AbstractKafkaSchemaSerDe.SubjectSchema,AbstractKafkaSchemaSerDe.ExtendedSchema> latestVersions,
ReferenceSubjectNameStrategy strategy,
String topic,
boolean isKey,
ProtobufSchema schema)
Resolve schema dependencies recursively.
|
protected byte[] |
serializeImpl(String subject,
String topic,
boolean isKey,
org.apache.kafka.common.header.Headers headers,
T object,
ProtobufSchema schema) |
protected byte[] |
serializeImpl(String subject,
String topic,
boolean isKey,
T object,
ProtobufSchema schema) |
protected KafkaProtobufSerializerConfig |
serializerConfig(Map<String,?> props) |
clearKey, close, configureClientProperties, executeMigrations, executeRules, executeRules, getById, getBySubjectAndId, getByteBuffer, getContextName, getContextName, getLatestWithMetadata, getMigrations, getOldSubjectName, getRuleActions, getRuleExecutors, getSchemaById, getSchemaBySubjectAndId, getSchemaRegistryClient, getSubjectName, isDeprecatedSubjectNameStrategy, isKey, key, latestVersionsCache, latestWithMetadataCache, lookupLatestVersion, lookupLatestVersion, lookupSchemaBySubjectAndId, postOp, register, register, register, registerWithResponse, setKey, strategyUsesSchema, ticker, toKafkaExceptionprotected boolean normalizeSchema
protected boolean autoRegisterSchema
protected boolean propagateSchemaTags
protected boolean onlyLookupReferencesBySchema
protected int useSchemaId
protected boolean idCompatStrict
protected boolean latestCompatStrict
protected String schemaFormat
protected boolean skipKnownTypes
protected ReferenceSubjectNameStrategy referenceSubjectNameStrategy
protected void configure(KafkaProtobufSerializerConfig config)
protected KafkaProtobufSerializerConfig serializerConfig(Map<String,?> props)
protected byte[] serializeImpl(String subject, String topic, boolean isKey, T object, ProtobufSchema schema) throws org.apache.kafka.common.errors.SerializationException, org.apache.kafka.common.errors.InvalidConfigurationException
org.apache.kafka.common.errors.SerializationExceptionorg.apache.kafka.common.errors.InvalidConfigurationExceptionprotected byte[] serializeImpl(String subject, String topic, boolean isKey, org.apache.kafka.common.header.Headers headers, T object, ProtobufSchema schema) throws org.apache.kafka.common.errors.SerializationException, org.apache.kafka.common.errors.InvalidConfigurationException
org.apache.kafka.common.errors.SerializationExceptionorg.apache.kafka.common.errors.InvalidConfigurationExceptionpublic static ProtobufSchema resolveDependencies(SchemaRegistryClient schemaRegistry, boolean autoRegisterSchema, boolean useLatestVersion, boolean latestCompatStrict, Map<AbstractKafkaSchemaSerDe.SubjectSchema,AbstractKafkaSchemaSerDe.ExtendedSchema> latestVersions, ReferenceSubjectNameStrategy strategy, String topic, boolean isKey, ProtobufSchema schema) throws IOException, RestClientException
schemaRegistry - schema registry clientautoRegisterSchema - whether to automatically register schemasuseLatestVersion - whether to use the latest subject version for serializationlatestCompatStrict - whether to check that the latest subject version is backward
compatible with the schema of the objectlatestVersions - an optional cache of latest subject versions, may be nullstrategy - the strategy for determining the subject name for a referencetopic - the topicisKey - whether the object is the record keyschema - the schemaIOExceptionRestClientExceptionpublic static ProtobufSchema resolveDependencies(SchemaRegistryClient schemaRegistry, boolean autoRegisterSchema, boolean useLatestVersion, boolean latestCompatStrict, Map<AbstractKafkaSchemaSerDe.SubjectSchema,AbstractKafkaSchemaSerDe.ExtendedSchema> latestVersions, boolean skipKnownTypes, ReferenceSubjectNameStrategy strategy, String topic, boolean isKey, ProtobufSchema schema) throws IOException, RestClientException
schemaRegistry - schema registry clientautoRegisterSchema - whether to automatically register schemasuseLatestVersion - whether to use the latest subject version for serializationlatestCompatStrict - whether to check that the latest subject version is backward
compatible with the schema of the objectlatestVersions - an optional cache of latest subject versions, may be nullskipKnownTypes - whether to skip known types when resolving schema dependenciesstrategy - the strategy for determining the subject name for a referencetopic - the topicisKey - whether the object is the record keyschema - the schemaIOExceptionRestClientExceptionpublic static ProtobufSchema resolveDependencies(SchemaRegistryClient schemaRegistry, boolean normalizeSchema, boolean autoRegisterSchema, boolean useLatestVersion, boolean latestCompatStrict, Map<AbstractKafkaSchemaSerDe.SubjectSchema,AbstractKafkaSchemaSerDe.ExtendedSchema> latestVersions, boolean skipKnownTypes, ReferenceSubjectNameStrategy strategy, String topic, boolean isKey, ProtobufSchema schema) throws IOException, RestClientException
IOExceptionRestClientExceptionpublic static ProtobufSchema resolveDependencies(SchemaRegistryClient schemaRegistry, boolean normalizeSchema, boolean autoRegisterSchema, boolean propagateSchemaTags, boolean useLatestVersion, boolean latestCompatStrict, Map<AbstractKafkaSchemaSerDe.SubjectSchema,AbstractKafkaSchemaSerDe.ExtendedSchema> latestVersions, boolean skipKnownTypes, ReferenceSubjectNameStrategy strategy, String topic, boolean isKey, ProtobufSchema schema) throws IOException, RestClientException
schemaRegistry - schema registry clientnormalizeSchema - whether to normalized the schemaautoRegisterSchema - whether to automatically register schemaspropagateSchemaTags - whether to propagate tags during registrationuseLatestVersion - whether to use the latest subject version for serializationlatestCompatStrict - whether to check that the latest subject version is backward
compatible with the schema of the objectlatestVersions - an optional cache of latest subject versions, may be nullskipKnownTypes - whether to skip known types when resolving schema dependenciesstrategy - the strategy for determining the subject name for a referencetopic - the topicisKey - whether the object is the record keyschema - the schemaIOExceptionRestClientExceptionCopyright © 2026 Confluent, Inc.. All rights reserved.