@Internal public final class TopicNameUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
distinctTopics(List<String> topics)
Merge the same topics into one topics.
|
static boolean |
isInternal(String topic)
This method is refactored from
BrokerService in pulsar-broker which is not available
in Pulsar client. |
static boolean |
isPartitioned(String topic) |
static String |
topicName(String topic)
Ensure the given topic name should be a topic without partition information.
|
static String |
topicNameWithPartition(String topic,
int partitionId)
Create a topic name with partition information.
|
public static String topicName(String topic)
public static String topicNameWithPartition(String topic, int partitionId)
public static boolean isPartitioned(String topic)
public static List<String> distinctTopics(List<String> topics)
public static boolean isInternal(String topic)
BrokerService in pulsar-broker which is not available
in Pulsar client. We have to put it here and self maintained. Since these topic names would
never be changed for backward compatible, we only need to add new topic names after version
bump.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.