Class QualifiedReferenceSubjectNameStrategy
java.lang.Object
io.confluent.kafka.serializers.subject.QualifiedReferenceSubjectNameStrategy
- All Implemented Interfaces:
ReferenceSubjectNameStrategy,org.apache.kafka.common.Configurable
public class QualifiedReferenceSubjectNameStrategy
extends Object
implements ReferenceSubjectNameStrategy
An implementation of
ReferenceSubjectNameStrategy that makes a reference name that
represents a path appear as a qualified name.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsubjectName(String refName, String topic, boolean isKey, ParsedSchema schema) Given a reference name, this method returns a subject name.
-
Constructor Details
-
QualifiedReferenceSubjectNameStrategy
public QualifiedReferenceSubjectNameStrategy()
-
-
Method Details
-
subjectName
Given a reference name, this method returns a subject name. The reference name here is simply the path of the Protobuf file, with slashes replaced by dots, and the .proto suffix removed.- Specified by:
subjectNamein interfaceReferenceSubjectNameStrategy- Parameters:
refName- name of the reference, the relative path of the Protobuf filetopic- the topic nameisKey- whether this reference is a key or a valueschema- the in-memory representation of the Protobuf schema- Returns:
- the subject name
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable
-