Class IAdminClientExtensions
Extension methods for default IAdminClient implementations.
Inherited Members
Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.dll
Syntax
public static class IAdminClientExtensions
Methods
DescribeClusterAsync(IAdminClient, DescribeClusterOptions)
Describes the cluster.
Declaration
public static Task<DescribeClusterResult> DescribeClusterAsync(this IAdminClient adminClient, DescribeClusterOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IAdminClient | adminClient | AdminClient interface. |
DescribeClusterOptions | options | The options to use while describing cluster. |
Returns
Type | Description |
---|---|
Task<DescribeClusterResult> |
Exceptions
Type | Condition |
---|---|
KafkaException | Thrown if there is any client-level error. |
DescribeTopicsAsync(IAdminClient, TopicCollection, DescribeTopicsOptions)
Describes topics in the cluster.
Declaration
public static Task<DescribeTopicsResult> DescribeTopicsAsync(this IAdminClient adminClient, TopicCollection topicCollection, DescribeTopicsOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IAdminClient | adminClient | AdminClient interface. |
TopicCollection | topicCollection | A collection of topics to describe. |
DescribeTopicsOptions | options | The options to use while describing topics. |
Returns
Type | Description |
---|---|
Task<DescribeTopicsResult> | A DescribeTopicsResult, which contains a List of TopicDescription. |
Exceptions
Type | Condition |
---|---|
KafkaException | Thrown if there is any client-level error. |
DescribeTopicsException | Thrown if any of the constituent results is in error. The entire result (which may contain constituent results that are not in error) is available via the Results property of the exception. |
ElectLeadersAsync(IAdminClient, ElectionType, IEnumerable<TopicPartition>, ElectLeadersOptions)
Perform Preferred or Unclean leader election for partitions.
Declaration
public static Task<ElectLeadersResult> ElectLeadersAsync(this IAdminClient adminClient, ElectionType electionType, IEnumerable<TopicPartition> partitions = null, ElectLeadersOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IAdminClient | adminClient | AdminClient interface. |
ElectionType | electionType | The type of election to trigger(Preferred or Unclean). |
IEnumerable<TopicPartition> | partitions | The partitions for which election has to be performed. For NULL partitions, election will be performed for all partitions. But results will be shown only where the election is successful or an error other than ELECTION_NOT_NEEDED is encountered. |
ElectLeadersOptions | options | The options to use for this call. |
Returns
Type | Description |
---|---|
Task<ElectLeadersResult> |
ListOffsetsAsync(IAdminClient, IEnumerable<TopicPartitionOffsetSpec>, ListOffsetsOptions)
Enables to find the beginning offset, end offset as well as the offset matching a timestamp or the offset with max timestamp in partitions.
Declaration
public static Task<ListOffsetsResult> ListOffsetsAsync(this IAdminClient adminClient, IEnumerable<TopicPartitionOffsetSpec> topicPartitionOffsets, ListOffsetsOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IAdminClient | adminClient | AdminClient interface. |
IEnumerable<TopicPartitionOffsetSpec> | topicPartitionOffsets | A IEnumerable with partition to offset pairs (partitions must be unique). |
ListOffsetsOptions | options | The options to use for this call. |
Returns
Type | Description |
---|---|
Task<ListOffsetsResult> |