public class RecordNameStrategy extends Object implements SubjectNameStrategy, SubjectNameStrategy
| Constructor and Description |
|---|
RecordNameStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Map<String,?> config) |
protected String |
getRecordName(ParsedSchema schema,
boolean isKey)
If the schema is a record type, returns its fully-qualified name.
|
String |
getSubjectName(String topic,
boolean isKey,
Object value)
Deprecated.
|
String |
subjectName(String topic,
boolean isKey,
ParsedSchema schema)
For a given topic and message, returns the subject name under which the
schema should be registered in the schema registry.
|
boolean |
usesSchema()
Whether the strategy depends on the schema.
|
public void configure(Map<String,?> config)
configure in interface org.apache.kafka.common.Configurablepublic boolean usesSchema()
SubjectNameStrategypublic String subjectName(String topic, boolean isKey, ParsedSchema schema)
SubjectNameStrategytopic - The Kafka topic name to which the message is being published.isKey - True when encoding a message key, false for a message value.schema - the schema of the record being serialized/deserializedprotected String getRecordName(ParsedSchema schema, boolean isKey)
@Deprecated public String getSubjectName(String topic, boolean isKey, Object value)
SubjectNameStrategygetSubjectName in interface SubjectNameStrategytopic - The Kafka topic name to which the message is being published.isKey - True when encoding a message key, false for a message value.value - The value to be published in the message.Copyright © 2025 Confluent, Inc.. All rights reserved.