Class PartitionLookupUtils (1.6.2)

public final class PartitionLookupUtils

Utilities for looking up information on partitions.

Inheritance

java.lang.Object > PartitionLookupUtils

Static Methods

numPartitions(SubscriptionPath subscription)

public static int numPartitions(SubscriptionPath subscription)

Look up the number of partitions in the topic associated with a subscription.

Parameter
NameDescription
subscriptionSubscriptionPath
Returns
TypeDescription
int
Exceptions
TypeDescription
ApiException

numPartitions(SubscriptionPath subscription, AdminClient client)

public static int numPartitions(SubscriptionPath subscription, AdminClient client)

Look up the number of partitions in the topic associated with a subscription using the provided AdminClient.

Parameters
NameDescription
subscriptionSubscriptionPath
clientAdminClient
Returns
TypeDescription
int
Exceptions
TypeDescription
ApiException

numPartitions(TopicPath topic)

public static int numPartitions(TopicPath topic)

Look up the number of partitions in a topic.

Parameter
NameDescription
topicTopicPath
Returns
TypeDescription
int
Exceptions
TypeDescription
ApiException

numPartitions(TopicPath topic, AdminClient client)

public static int numPartitions(TopicPath topic, AdminClient client)

Look up the number of partitions in a topic using the provided AdminClient.

Parameters
NameDescription
topicTopicPath
clientAdminClient
Returns
TypeDescription
int
Exceptions
TypeDescription
ApiException