Class TopicIdAndName
java.lang.Object
org.apache.kafka.common.TopicIdAndName
Represents a Kafka topic with both its globally unique ID and name.
Uniqueness and Equality:
For this class, both the ID and name together form the complete unique identifier for a topic. Two
TopicIdAndName objects are considered to represent different topics if they have
different IDs, even if they have the same name. This means that topics with the same name
but different IDs are treated as distinct entities, which can occur in scenarios such as:
- Topic recreation after deletion (new ID assigned)
- Cross-cluster topic references
- Historical topic snapshots
This class is immutable and thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionTopicIdAndName(Uuid id, String name) Creates a new TopicIdAndName with the specified ID and name. -
Method Summary
-
Constructor Details
-
TopicIdAndName
-
-
Method Details
-
id
-
name
-
equals
-
hashCode
-
toString
-