Interface IAdminClient
Defines an Apache Kafka admin client.
Inherited Members
Namespace: Confluent.Kafka
Assembly: cs.temp.dll.dll
Syntax
public interface IAdminClient : IClient, IDisposable
Methods
AlterConfigsAsync(Dictionary<ConfigResource, List<ConfigEntry>>, AlterConfigsOptions)
Update the configuration for the specified resources. Updates are not transactional so they may succeed for some resources while fail for others. The configs for a particular resource are updated atomically. This operation is supported by brokers with version 0.11.0 or higher. IMPORTANT NOTE: Unspecified configuration properties will be reverted to their default values. Furthermore, if you use DescribeConfigsAsync to obtain the current set of configuration values, modify them, then use AlterConfigsAsync to set them, you will loose any non-default values that are marked as sensitive because they are not provided by DescribeConfigsAsync.
Declaration
Task AlterConfigsAsync(Dictionary<ConfigResource, List<ConfigEntry>> configs, AlterConfigsOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<ConfigResource, System.Collections.Generic.List<ConfigEntry>> | configs | The resources with their configs (topic is the only resource type with configs that can be updated currently). |
AlterConfigsOptions | options | The options to use when altering configs. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The results of the alter configs requests. |
CreatePartitionsAsync(IEnumerable<PartitionsSpecification>, CreatePartitionsOptions)
Increase the number of partitions for one or more topics as per the supplied PartitionsSpecifications.
Declaration
Task CreatePartitionsAsync(IEnumerable<PartitionsSpecification> partitionsSpecifications, CreatePartitionsOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<PartitionsSpecification> | partitionsSpecifications | A collection of PartitionsSpecifications. |
CreatePartitionsOptions | options | The options to use when creating the partitions. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The results of the PartitionsSpecification requests. |
CreateTopicsAsync(IEnumerable<TopicSpecification>, CreateTopicsOptions)
Create a set of new topics.
Declaration
Task CreateTopicsAsync(IEnumerable<TopicSpecification> topics, CreateTopicsOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TopicSpecification> | topics | A collection of specifications for the new topics to create. |
CreateTopicsOptions | options | The options to use when creating the topics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The results of the create topic requests. |
DeleteRecordsAsync(IEnumerable<TopicPartitionOffset>, DeleteRecordsOptions)
Delete records (messages) in topic partitions older than the offsets provided.
Declaration
Task<List<DeleteRecordsResult>> DeleteRecordsAsync(IEnumerable<TopicPartitionOffset> topicPartitionOffsets, DeleteRecordsOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TopicPartitionOffset> | topicPartitionOffsets | The offsets to delete up to. |
DeleteRecordsOptions | options | The options to use when deleting records. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<DeleteRecordsResult>> | The result of the delete records request. |
DeleteTopicsAsync(IEnumerable<String>, DeleteTopicsOptions)
Delete a set of topics. This operation is not transactional so it may succeed for some topics while fail for others. It may take several seconds after the DeleteTopicsResult returns success for all the brokers to become aware that the topics are gone. During this time, topics may continue to be visible via admin operations. If delete.topic.enable is false on the brokers, DeleteTopicsAsync will mark the topics for deletion, but not actually delete them. The Task will return successfully in this case.
Declaration
Task DeleteTopicsAsync(IEnumerable<string> topics, DeleteTopicsOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | topics | The topic names to delete. |
DeleteTopicsOptions | options | The options to use when deleting topics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The results of the delete topic requests. |
DescribeConfigsAsync(IEnumerable<ConfigResource>, DescribeConfigsOptions)
Get the configuration for the specified resources. The returned configuration includes default values and the IsDefault property can be used to distinguish them from user supplied values. The value of config entries where IsSensitive is true is always null so that sensitive information is not disclosed. Config entries where IsReadOnly is true cannot be updated. This operation is supported by brokers with version 0.11.0.0 or higher.
Declaration
Task<List<DescribeConfigsResult>> DescribeConfigsAsync(IEnumerable<ConfigResource> resources, DescribeConfigsOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ConfigResource> | resources | The resources (topic and broker resource types are currently supported) |
DescribeConfigsOptions | options | The options to use when describing configs. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<DescribeConfigsResult>> | Configs for the specified resources. |
GetMetadata(String, TimeSpan)
Query the cluster for metadata for a specific topic.
[API-SUBJECT-TO-CHANGE] - The API associated with this functionality is subject to change.
Declaration
Metadata GetMetadata(string topic, TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
System.String | topic | |
System.TimeSpan | timeout |
Returns
Type | Description |
---|---|
Metadata |
GetMetadata(TimeSpan)
Query the cluster for metadata.
[API-SUBJECT-TO-CHANGE] - The API associated with this functionality is subject to change.
Declaration
Metadata GetMetadata(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | timeout |
Returns
Type | Description |
---|---|
Metadata |
ListGroup(String, TimeSpan)
Get information pertaining to a particular group in the Kafka cluster (blocking).
[API-SUBJECT-TO-CHANGE] - The API associated with this functionality is subject to change.
Declaration
GroupInfo ListGroup(string group, TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
System.String | group | The group of interest. |
System.TimeSpan | timeout | The maximum period of time the call may block. |
Returns
Type | Description |
---|---|
GroupInfo | Returns information pertaining to the specified group or null if this group does not exist. |
ListGroups(TimeSpan)
Get information pertaining to all groups in the Kafka cluster (blocking)
[API-SUBJECT-TO-CHANGE] - The API associated with this functionality is subject to change.
Declaration
List<GroupInfo> ListGroups(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | timeout | The maximum period of time the call may block. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<GroupInfo> |