Class PartitionLookupUtils (1.13.3)

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
Name Description
subscription SubscriptionPath
Returns
Type Description
int
Exceptions
Type Description
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
Name Description
subscription SubscriptionPath
client AdminClient
Returns
Type Description
int
Exceptions
Type Description
ApiException

numPartitions(TopicPath topic)

public static int numPartitions(TopicPath topic)

Look up the number of partitions in a topic.

Parameter
Name Description
topic TopicPath
Returns
Type Description
int
Exceptions
Type Description
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
Name Description
topic TopicPath
client AdminClient
Returns
Type Description
int
Exceptions
Type Description
ApiException