Skip to main content

KafkaAdminClient

Struct KafkaAdminClient 

Source
pub struct KafkaAdminClient { /* private fields */ }
Expand description

The administrative client for Kafka.

Corresponds to org.apache.kafka.clients.admin.KafkaAdminClient.

Trait Implementations§

Source§

impl Admin for KafkaAdminClient

Source§

fn create_topics_with_options( &self, new_topics: &[NewTopic], options: CreateTopicsOptions, ) -> CreateTopicsResult

Create a batch of new topics. Read more
Source§

fn delete_topics_with_options( &self, topics: TopicCollection, options: DeleteTopicsOptions, ) -> DeleteTopicsResult

Delete a batch of topics (by name or by id, per the TopicCollection). Read more
Source§

fn list_topics_with_options( &self, options: ListTopicsOptions, ) -> ListTopicsResult

List the topics available in the cluster. Read more
Source§

fn describe_topics_with_topics_options( &self, topics: TopicCollection, options: DescribeTopicsOptions, ) -> DescribeTopicsResult

Describe some topics in the cluster (by name or by id, per the TopicCollection). Read more
Source§

fn create_partitions_with_options( &self, new_partitions: &HashMap<String, NewPartitions>, options: CreatePartitionsOptions, ) -> CreatePartitionsResult

Increase the number of partitions of the given topics. Read more
Source§

fn delete_records_with_options( &self, records_to_delete: &HashMap<TopicPartition, RecordsToDelete>, options: DeleteRecordsOptions, ) -> DeleteRecordsResult

Delete records whose offset is smaller than the given offset of the corresponding partition. Read more
Source§

fn describe_producers_with_options( &self, partitions: &[TopicPartition], options: DescribeProducersOptions, ) -> DescribeProducersResult

Describe the active producers for a set of topic partitions. Read more
Source§

fn abort_transaction_with_options( &self, spec: AbortTransactionSpec, options: AbortTransactionOptions, ) -> AbortTransactionResult

Forcefully abort a transaction which is open on a topic partition. Read more
Source§

fn describe_transactions_with_options( &self, transactional_ids: &[String], options: DescribeTransactionsOptions, ) -> DescribeTransactionsResult

List the transaction states of the given transactional ids. Read more
Source§

fn fence_producers_with_options( &self, transactional_ids: &[String], options: FenceProducersOptions, ) -> FenceProducersResult

Fence out all active producers that use any of the provided transactional ids. Read more
Source§

fn list_transactions_with_options( &self, options: ListTransactionsOptions, ) -> ListTransactionsResult

List the transactions in the cluster (fans out to all brokers). Read more
Source§

fn force_terminate_transaction_with_options( &self, transactional_id: &str, options: TerminateTransactionOptions, ) -> TerminateTransactionResult

Forcefully terminate an ongoing transaction for a given transactional id. Read more
Source§

fn describe_cluster_with_options( &self, options: DescribeClusterOptions, ) -> DescribeClusterResult

Get information about the nodes in the cluster. Read more
Source§

fn describe_configs_with_options( &self, config_resources: &[ConfigResource], options: DescribeConfigsOptions, ) -> DescribeConfigsResult

Get the configuration for the specified resources. Read more
Source§

fn incremental_alter_configs_with_options( &self, configs: &HashMap<ConfigResource, Vec<AlterConfigOp>>, options: AlterConfigsOptions, ) -> AlterConfigsResult

Incrementally update the configuration for the specified resources. Read more
Source§

fn list_config_resources_with_options( &self, config_resource_types: &HashSet<Type>, options: ListConfigResourcesOptions, ) -> ListConfigResourcesResult

List the config resources available in the cluster whose type is in the given set (an empty set means all supported types). Read more
Source§

fn describe_log_dirs_with_options( &self, brokers: &[i32], options: DescribeLogDirsOptions, ) -> DescribeLogDirsResult

Query the information of all log directories on the given set of brokers. Read more
Source§

fn alter_replica_log_dirs_with_options( &self, replica_assignment: &HashMap<TopicPartitionReplica, String>, options: AlterReplicaLogDirsOptions, ) -> AlterReplicaLogDirsResult

Change the log directory for the specified replicas. Read more
Source§

fn describe_replica_log_dirs_with_options( &self, replicas: &[TopicPartitionReplica], options: DescribeReplicaLogDirsOptions, ) -> DescribeReplicaLogDirsResult

Query the replica log directory information for the specified replicas. Read more
Source§

fn elect_leaders_with_options( &self, election_type: ElectionType, partitions: Option<HashSet<TopicPartition>>, options: ElectLeadersOptions, ) -> ElectLeadersResult

Elect a replica as leader for the given partitions, or for all partitions if partitions is None. Read more
Source§

fn alter_partition_reassignments_with_options( &self, reassignments: &HashMap<TopicPartition, Option<NewPartitionReassignment>>, options: AlterPartitionReassignmentsOptions, ) -> AlterPartitionReassignmentsResult

Change the partition reassignments for the given partitions. Read more
Source§

fn list_partition_reassignments_with_partitions_options( &self, partitions: Option<HashSet<TopicPartition>>, options: ListPartitionReassignmentsOptions, ) -> ListPartitionReassignmentsResult

List the current partition reassignments, optionally restricted to a set of partitions (None lists all ongoing reassignments). Read more
Source§

fn list_offsets_with_options( &self, topic_partition_offsets: &HashMap<TopicPartition, OffsetSpec>, options: ListOffsetsOptions, ) -> ListOffsetsResult

List the offsets for the given partitions and offset specifications. Read more
Source§

fn list_groups_with_options( &self, options: ListGroupsOptions, ) -> ListGroupsResult

List the groups available in the cluster. Read more
Source§

fn describe_consumer_groups_with_options( &self, group_ids: &[String], options: DescribeConsumerGroupsOptions, ) -> DescribeConsumerGroupsResult

Describe some consumer groups in the cluster. Read more
Source§

fn describe_classic_groups_with_options( &self, group_ids: &[String], options: DescribeClassicGroupsOptions, ) -> DescribeClassicGroupsResult

Describe some classic groups in the cluster. Read more
Source§

fn list_consumer_group_offsets_with_group_specs_options( &self, group_specs: &HashMap<String, ListConsumerGroupOffsetsSpec>, options: ListConsumerGroupOffsetsOptions, ) -> ListConsumerGroupOffsetsResult

List the consumer group offsets available in the cluster for the given group specifications. Read more
Source§

fn alter_consumer_group_offsets_with_options( &self, group_id: &str, offsets: &HashMap<TopicPartition, OffsetAndMetadata>, options: AlterConsumerGroupOffsetsOptions, ) -> AlterConsumerGroupOffsetsResult

Alter offsets for a consumer group. Read more
Source§

fn delete_consumer_group_offsets_with_options( &self, group_id: &str, partitions: &HashSet<TopicPartition>, options: DeleteConsumerGroupOffsetsOptions, ) -> DeleteConsumerGroupOffsetsResult

Delete offsets for a set of partitions in a consumer group. Read more
Source§

fn delete_consumer_groups_with_options( &self, group_ids: &[String], options: DeleteConsumerGroupsOptions, ) -> DeleteConsumerGroupsResult

Delete consumer groups from the cluster. Read more
Source§

fn remove_members_from_consumer_group_with_options( &self, group_id: &str, options: RemoveMembersFromConsumerGroupOptions, ) -> RemoveMembersFromConsumerGroupResult

Remove members from a consumer group by given member identities. Read more
Source§

fn create_acls_with_options( &self, acls: &[AclBinding], options: CreateAclsOptions, ) -> CreateAclsResult

Create ACLs. Read more
Source§

fn describe_acls_with_options( &self, filter: &AclBindingFilter, options: DescribeAclsOptions, ) -> DescribeAclsResult

Describe ACLs matching the provided filter. Read more
Source§

fn delete_acls_with_options( &self, filters: &[AclBindingFilter], options: DeleteAclsOptions, ) -> DeleteAclsResult

Delete ACLs matching the provided filters. Read more
Source§

fn describe_client_quotas_with_options( &self, filter: &ClientQuotaFilter, options: DescribeClientQuotasOptions, ) -> DescribeClientQuotasResult

Describe the client quotas matching the provided filter. Read more
Source§

fn alter_client_quotas_with_options( &self, entries: &[ClientQuotaAlteration], options: AlterClientQuotasOptions, ) -> AlterClientQuotasResult

Alter the client quotas of one or more quota entities. Read more
Source§

fn describe_user_scram_credentials_with_users_options( &self, users: &[String], options: DescribeUserScramCredentialsOptions, ) -> DescribeUserScramCredentialsResult

Describe all SASL/SCRAM credentials for the given users, or all users if users is empty. Read more
Source§

fn alter_user_scram_credentials_with_options( &self, alterations: &[UserScramCredentialAlteration], options: AlterUserScramCredentialsOptions, ) -> AlterUserScramCredentialsResult

Alter (upsert / delete) SASL/SCRAM credentials for one or more users. Read more
Source§

fn create_delegation_token_with_options( &self, options: CreateDelegationTokenOptions, ) -> CreateDelegationTokenResult

Create a delegation token. Read more
Source§

fn renew_delegation_token_with_options( &self, hmac: &[u8], options: RenewDelegationTokenOptions, ) -> RenewDelegationTokenResult

Renew a delegation token identified by its HMAC. Read more
Source§

fn expire_delegation_token_with_options( &self, hmac: &[u8], options: ExpireDelegationTokenOptions, ) -> ExpireDelegationTokenResult

Expire a delegation token identified by its HMAC. Read more
Source§

fn describe_delegation_token_with_options( &self, options: DescribeDelegationTokenOptions, ) -> DescribeDelegationTokenResult

Describe the delegation tokens matching the provided owners filter. Read more
Source§

fn describe_features_with_options( &self, options: DescribeFeaturesOptions, ) -> DescribeFeaturesResult

Describe the finalized and supported features of the cluster. Read more
Source§

fn update_features_with_options( &self, feature_updates: &HashMap<String, FeatureUpdate>, options: UpdateFeaturesOptions, ) -> Result<UpdateFeaturesResult, Error>

Apply the given feature updates. Read more
Source§

fn close_with_timeout<'life0, 'async_trait>( &'life0 self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Close the admin client, awaiting the background task to finish in-flight work up to timeout. Read more
Source§

fn create_topics(&self, new_topics: &[NewTopic]) -> CreateTopicsResult

Create a batch of new topics. Read more
Source§

fn delete_topics(&self, topics: TopicCollection) -> DeleteTopicsResult

Delete a batch of topics (by name or by id, per the TopicCollection). Read more
Source§

fn list_topics(&self) -> ListTopicsResult

List the topics available in the cluster. Read more
Source§

fn describe_topics_with_topic_names( &self, topic_names: &[String], ) -> DescribeTopicsResult

Describe some topics in the cluster, by name. Read more
Source§

fn describe_topics_with_topic_names_options( &self, topic_names: &[String], options: DescribeTopicsOptions, ) -> DescribeTopicsResult

Describe some topics in the cluster, by name. Read more
Source§

fn describe_topics_with_topics( &self, topics: TopicCollection, ) -> DescribeTopicsResult

Describe some topics in the cluster (by name or by id, per the TopicCollection). Read more
Source§

fn create_partitions( &self, new_partitions: &HashMap<String, NewPartitions>, ) -> CreatePartitionsResult

Increase the number of partitions of the given topics. Read more
Source§

fn delete_records( &self, records_to_delete: &HashMap<TopicPartition, RecordsToDelete>, ) -> DeleteRecordsResult

Delete records whose offset is smaller than the given offset of the corresponding partition. Read more
Source§

fn describe_producers( &self, partitions: &[TopicPartition], ) -> DescribeProducersResult

Describe the active producers for a set of topic partitions. Read more
Source§

fn abort_transaction( &self, spec: AbortTransactionSpec, ) -> AbortTransactionResult

Forcefully abort a transaction which is open on a topic partition. Read more
Source§

fn describe_transactions( &self, transactional_ids: &[String], ) -> DescribeTransactionsResult

List the transaction states of the given transactional ids. Read more
Source§

fn fence_producers(&self, transactional_ids: &[String]) -> FenceProducersResult

Fence out all active producers that use any of the provided transactional ids. Read more
Source§

fn list_transactions(&self) -> ListTransactionsResult

List the transactions in the cluster (fans out to all brokers). Read more
Source§

fn force_terminate_transaction( &self, transactional_id: &str, ) -> TerminateTransactionResult

Forcefully terminate an ongoing transaction for a given transactional id. Read more
Source§

fn describe_cluster(&self) -> DescribeClusterResult

Get information about the nodes in the cluster. Read more
Source§

fn describe_configs( &self, config_resources: &[ConfigResource], ) -> DescribeConfigsResult

Get the configuration for the specified resources. Read more
Source§

fn incremental_alter_configs( &self, configs: &HashMap<ConfigResource, Vec<AlterConfigOp>>, ) -> AlterConfigsResult

Incrementally update the configuration for the specified resources. Read more
Source§

fn list_config_resources(&self) -> ListConfigResourcesResult

List all the config resources available in the cluster. Read more
Source§

fn describe_log_dirs(&self, brokers: &[i32]) -> DescribeLogDirsResult

Query the information of all log directories on the given set of brokers. Read more
Source§

fn alter_replica_log_dirs( &self, replica_assignment: &HashMap<TopicPartitionReplica, String>, ) -> AlterReplicaLogDirsResult

Change the log directory for the specified replicas. Read more
Source§

fn describe_replica_log_dirs( &self, replicas: &[TopicPartitionReplica], ) -> DescribeReplicaLogDirsResult

Query the replica log directory information for the specified replicas. Read more
Source§

fn elect_leaders( &self, election_type: ElectionType, partitions: Option<HashSet<TopicPartition>>, ) -> ElectLeadersResult

Elect a replica as leader for the given partitions, or for all partitions if partitions is None. Read more
Source§

fn alter_partition_reassignments( &self, reassignments: &HashMap<TopicPartition, Option<NewPartitionReassignment>>, ) -> AlterPartitionReassignmentsResult

Change the partition reassignments for the given partitions. Read more
Source§

fn list_partition_reassignments(&self) -> ListPartitionReassignmentsResult

List all the current partition reassignments. Read more
Source§

fn list_partition_reassignments_with_partitions( &self, partitions: HashSet<TopicPartition>, ) -> ListPartitionReassignmentsResult

List the current partition reassignments for the given partitions. Read more
Source§

fn list_partition_reassignments_with_options( &self, options: ListPartitionReassignmentsOptions, ) -> ListPartitionReassignmentsResult

List all the current partition reassignments, with options. Read more
Source§

fn list_offsets( &self, topic_partition_offsets: &HashMap<TopicPartition, OffsetSpec>, ) -> ListOffsetsResult

List the offsets for the given partitions and offset specifications. Read more
Source§

fn list_groups(&self) -> ListGroupsResult

List the groups available in the cluster. Read more
Source§

fn describe_consumer_groups( &self, group_ids: &[String], ) -> DescribeConsumerGroupsResult

Describe some consumer groups in the cluster. Read more
Source§

fn describe_classic_groups( &self, group_ids: &[String], ) -> DescribeClassicGroupsResult

Describe some classic groups in the cluster. Read more
Source§

fn list_consumer_group_offsets_with_group_id( &self, group_id: &str, ) -> ListConsumerGroupOffsetsResult

List the consumer group offsets available in the cluster for the given group. Read more
Source§

fn list_consumer_group_offsets_with_group_id_options( &self, group_id: &str, options: ListConsumerGroupOffsetsOptions, ) -> ListConsumerGroupOffsetsResult

List the consumer group offsets available in the cluster for the given group, with options. Read more
Source§

fn list_consumer_group_offsets_with_group_specs( &self, group_specs: &HashMap<String, ListConsumerGroupOffsetsSpec>, ) -> ListConsumerGroupOffsetsResult

List the consumer group offsets available in the cluster for the given group specifications. Read more
Source§

fn alter_consumer_group_offsets( &self, group_id: &str, offsets: &HashMap<TopicPartition, OffsetAndMetadata>, ) -> AlterConsumerGroupOffsetsResult

Alter offsets for a consumer group. Read more
Source§

fn delete_consumer_group_offsets( &self, group_id: &str, partitions: &HashSet<TopicPartition>, ) -> DeleteConsumerGroupOffsetsResult

Delete offsets for a set of partitions in a consumer group. Read more
Source§

fn delete_consumer_groups( &self, group_ids: &[String], ) -> DeleteConsumerGroupsResult

Delete consumer groups from the cluster. Read more
Source§

fn create_acls(&self, acls: &[AclBinding]) -> CreateAclsResult

Create ACLs. Read more
Source§

fn describe_acls(&self, filter: &AclBindingFilter) -> DescribeAclsResult

Describe ACLs matching the provided filter. Read more
Source§

fn delete_acls(&self, filters: &[AclBindingFilter]) -> DeleteAclsResult

Delete ACLs matching the provided filters. Read more
Source§

fn describe_client_quotas( &self, filter: &ClientQuotaFilter, ) -> DescribeClientQuotasResult

Describe the client quotas matching the provided filter. Read more
Source§

fn alter_client_quotas( &self, entries: &[ClientQuotaAlteration], ) -> AlterClientQuotasResult

Alter the client quotas of one or more quota entities. Read more
Source§

fn describe_user_scram_credentials(&self) -> DescribeUserScramCredentialsResult

Describe the SASL/SCRAM credentials for all users. Read more
Source§

fn describe_user_scram_credentials_with_users( &self, users: &[String], ) -> DescribeUserScramCredentialsResult

Describe the SASL/SCRAM credentials for the given users. Read more
Source§

fn alter_user_scram_credentials( &self, alterations: &[UserScramCredentialAlteration], ) -> AlterUserScramCredentialsResult

Alter (upsert / delete) SASL/SCRAM credentials for one or more users. Read more
Source§

fn create_delegation_token(&self) -> CreateDelegationTokenResult

Create a delegation token. Read more
Source§

fn renew_delegation_token(&self, hmac: &[u8]) -> RenewDelegationTokenResult

Renew a delegation token identified by its HMAC. Read more
Source§

fn expire_delegation_token(&self, hmac: &[u8]) -> ExpireDelegationTokenResult

Expire a delegation token identified by its HMAC. Read more
Source§

fn describe_delegation_token(&self) -> DescribeDelegationTokenResult

Describe the delegation tokens matching the provided owners filter. Read more
Source§

fn describe_features(&self) -> DescribeFeaturesResult

Describe the finalized and supported features of the cluster. Read more
Source§

fn update_features( &self, feature_updates: &HashMap<String, FeatureUpdate>, ) -> Result<UpdateFeaturesResult, Error>

Apply the given feature updates. Read more
Source§

fn close<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Close the admin client, awaiting the background task to finish its in-flight work. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V