Interface TopicNameMapping
public interface TopicNameMapping
The result of discovering the topic names for a collection of topic ids
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanbooleanMap<org.apache.kafka.common.Uuid, TopicNameMappingException> failures()Describes the reason for every failed mapping.
-
Field Details
-
EMPTY
-
-
Method Details
-
anyFailures
boolean anyFailures()- Returns:
- true if there are any failures
-
allFailures
default boolean allFailures()- Returns:
- true if all name mappings failed
-
topicNames
- Returns:
- immutable map from topic id to successfully mapped topic name
-
failures
Map<org.apache.kafka.common.Uuid,TopicNameMappingException> failures()Describes the reason for every failed mapping. Expected exception types are:TopLevelMetadataErrorExceptionindicates that we attempted to obtain Metadata from upstream, but received a top-level error in the responseTopicLevelMetadataErrorExceptionindicates that we attempted to obtain Metadata from upstream, but received a topic-level error in the responseTopicNameMappingExceptioncan be used to convey any other exception
TopicNameMappingException.getError()for conveniently determining the cause. Unhandled exceptions will be mapped to anErrors.UNKNOWN_SERVER_ERROR. Callers will be able to use this to detect expected cases likeErrors.UNKNOWN_TOPIC_ID.- Returns:
- immutable map from topic id to kafka server error
-