Skip to main content

Admin

Trait Admin 

Source
pub trait Admin: Send + Sync {
Show 96 methods // Required methods fn create_topics_with_options( &self, new_topics: &[NewTopic], options: CreateTopicsOptions, ) -> CreateTopicsResult; fn delete_topics_with_options( &self, topics: TopicCollection, options: DeleteTopicsOptions, ) -> DeleteTopicsResult; fn list_topics_with_options( &self, options: ListTopicsOptions, ) -> ListTopicsResult; fn describe_topics_with_topics_options( &self, topics: TopicCollection, options: DescribeTopicsOptions, ) -> DescribeTopicsResult; fn create_partitions_with_options( &self, new_partitions: &HashMap<String, NewPartitions>, options: CreatePartitionsOptions, ) -> CreatePartitionsResult; fn delete_records_with_options( &self, records_to_delete: &HashMap<TopicPartition, RecordsToDelete>, options: DeleteRecordsOptions, ) -> DeleteRecordsResult; fn describe_producers_with_options( &self, partitions: &[TopicPartition], options: DescribeProducersOptions, ) -> DescribeProducersResult; fn abort_transaction_with_options( &self, spec: AbortTransactionSpec, options: AbortTransactionOptions, ) -> AbortTransactionResult; fn describe_transactions_with_options( &self, transactional_ids: &[String], options: DescribeTransactionsOptions, ) -> DescribeTransactionsResult; fn fence_producers_with_options( &self, transactional_ids: &[String], options: FenceProducersOptions, ) -> FenceProducersResult; fn list_transactions_with_options( &self, options: ListTransactionsOptions, ) -> ListTransactionsResult; fn force_terminate_transaction_with_options( &self, transactional_id: &str, options: TerminateTransactionOptions, ) -> TerminateTransactionResult; fn describe_cluster_with_options( &self, options: DescribeClusterOptions, ) -> DescribeClusterResult; fn describe_configs_with_options( &self, config_resources: &[ConfigResource], options: DescribeConfigsOptions, ) -> DescribeConfigsResult; fn incremental_alter_configs_with_options( &self, configs: &HashMap<ConfigResource, Vec<AlterConfigOp>>, options: AlterConfigsOptions, ) -> AlterConfigsResult; fn list_config_resources_with_options( &self, config_resource_types: &HashSet<Type>, options: ListConfigResourcesOptions, ) -> ListConfigResourcesResult; fn describe_log_dirs_with_options( &self, brokers: &[i32], options: DescribeLogDirsOptions, ) -> DescribeLogDirsResult; fn alter_replica_log_dirs_with_options( &self, replica_assignment: &HashMap<TopicPartitionReplica, String>, options: AlterReplicaLogDirsOptions, ) -> AlterReplicaLogDirsResult; fn describe_replica_log_dirs_with_options( &self, replicas: &[TopicPartitionReplica], options: DescribeReplicaLogDirsOptions, ) -> DescribeReplicaLogDirsResult; fn elect_leaders_with_options( &self, election_type: ElectionType, partitions: Option<HashSet<TopicPartition>>, options: ElectLeadersOptions, ) -> ElectLeadersResult; fn alter_partition_reassignments_with_options( &self, reassignments: &HashMap<TopicPartition, Option<NewPartitionReassignment>>, options: AlterPartitionReassignmentsOptions, ) -> AlterPartitionReassignmentsResult; fn list_partition_reassignments_with_partitions_options( &self, partitions: Option<HashSet<TopicPartition>>, options: ListPartitionReassignmentsOptions, ) -> ListPartitionReassignmentsResult; fn list_offsets_with_options( &self, topic_partition_offsets: &HashMap<TopicPartition, OffsetSpec>, options: ListOffsetsOptions, ) -> ListOffsetsResult; fn list_groups_with_options( &self, options: ListGroupsOptions, ) -> ListGroupsResult; fn describe_consumer_groups_with_options( &self, group_ids: &[String], options: DescribeConsumerGroupsOptions, ) -> DescribeConsumerGroupsResult; fn describe_classic_groups_with_options( &self, group_ids: &[String], options: DescribeClassicGroupsOptions, ) -> DescribeClassicGroupsResult; fn list_consumer_group_offsets_with_group_specs_options( &self, group_specs: &HashMap<String, ListConsumerGroupOffsetsSpec>, options: ListConsumerGroupOffsetsOptions, ) -> ListConsumerGroupOffsetsResult; fn alter_consumer_group_offsets_with_options( &self, group_id: &str, offsets: &HashMap<TopicPartition, OffsetAndMetadata>, options: AlterConsumerGroupOffsetsOptions, ) -> AlterConsumerGroupOffsetsResult; fn delete_consumer_group_offsets_with_options( &self, group_id: &str, partitions: &HashSet<TopicPartition>, options: DeleteConsumerGroupOffsetsOptions, ) -> DeleteConsumerGroupOffsetsResult; fn delete_consumer_groups_with_options( &self, group_ids: &[String], options: DeleteConsumerGroupsOptions, ) -> DeleteConsumerGroupsResult; fn remove_members_from_consumer_group_with_options( &self, group_id: &str, options: RemoveMembersFromConsumerGroupOptions, ) -> RemoveMembersFromConsumerGroupResult; fn create_acls_with_options( &self, acls: &[AclBinding], options: CreateAclsOptions, ) -> CreateAclsResult; fn describe_acls_with_options( &self, filter: &AclBindingFilter, options: DescribeAclsOptions, ) -> DescribeAclsResult; fn delete_acls_with_options( &self, filters: &[AclBindingFilter], options: DeleteAclsOptions, ) -> DeleteAclsResult; fn describe_client_quotas_with_options( &self, filter: &ClientQuotaFilter, options: DescribeClientQuotasOptions, ) -> DescribeClientQuotasResult; fn alter_client_quotas_with_options( &self, entries: &[ClientQuotaAlteration], options: AlterClientQuotasOptions, ) -> AlterClientQuotasResult; fn describe_user_scram_credentials_with_users_options( &self, users: &[String], options: DescribeUserScramCredentialsOptions, ) -> DescribeUserScramCredentialsResult; fn alter_user_scram_credentials_with_options( &self, alterations: &[UserScramCredentialAlteration], options: AlterUserScramCredentialsOptions, ) -> AlterUserScramCredentialsResult; fn create_delegation_token_with_options( &self, options: CreateDelegationTokenOptions, ) -> CreateDelegationTokenResult; fn renew_delegation_token_with_options( &self, hmac: &[u8], options: RenewDelegationTokenOptions, ) -> RenewDelegationTokenResult; fn expire_delegation_token_with_options( &self, hmac: &[u8], options: ExpireDelegationTokenOptions, ) -> ExpireDelegationTokenResult; fn describe_delegation_token_with_options( &self, options: DescribeDelegationTokenOptions, ) -> DescribeDelegationTokenResult; fn describe_features_with_options( &self, options: DescribeFeaturesOptions, ) -> DescribeFeaturesResult; fn update_features_with_options( &self, feature_updates: &HashMap<String, FeatureUpdate>, options: UpdateFeaturesOptions, ) -> Result<UpdateFeaturesResult, Error>; 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; // Provided methods fn create_topics(&self, new_topics: &[NewTopic]) -> CreateTopicsResult { ... } fn delete_topics(&self, topics: TopicCollection) -> DeleteTopicsResult { ... } fn list_topics(&self) -> ListTopicsResult { ... } fn describe_topics_with_topic_names( &self, topic_names: &[String], ) -> DescribeTopicsResult { ... } fn describe_topics_with_topic_names_options( &self, topic_names: &[String], options: DescribeTopicsOptions, ) -> DescribeTopicsResult { ... } fn describe_topics_with_topics( &self, topics: TopicCollection, ) -> DescribeTopicsResult { ... } fn create_partitions( &self, new_partitions: &HashMap<String, NewPartitions>, ) -> CreatePartitionsResult { ... } fn delete_records( &self, records_to_delete: &HashMap<TopicPartition, RecordsToDelete>, ) -> DeleteRecordsResult { ... } fn describe_producers( &self, partitions: &[TopicPartition], ) -> DescribeProducersResult { ... } fn abort_transaction( &self, spec: AbortTransactionSpec, ) -> AbortTransactionResult { ... } fn describe_transactions( &self, transactional_ids: &[String], ) -> DescribeTransactionsResult { ... } fn fence_producers( &self, transactional_ids: &[String], ) -> FenceProducersResult { ... } fn list_transactions(&self) -> ListTransactionsResult { ... } fn force_terminate_transaction( &self, transactional_id: &str, ) -> TerminateTransactionResult { ... } fn describe_cluster(&self) -> DescribeClusterResult { ... } fn describe_configs( &self, config_resources: &[ConfigResource], ) -> DescribeConfigsResult { ... } fn incremental_alter_configs( &self, configs: &HashMap<ConfigResource, Vec<AlterConfigOp>>, ) -> AlterConfigsResult { ... } fn list_config_resources(&self) -> ListConfigResourcesResult { ... } fn describe_log_dirs(&self, brokers: &[i32]) -> DescribeLogDirsResult { ... } fn alter_replica_log_dirs( &self, replica_assignment: &HashMap<TopicPartitionReplica, String>, ) -> AlterReplicaLogDirsResult { ... } fn describe_replica_log_dirs( &self, replicas: &[TopicPartitionReplica], ) -> DescribeReplicaLogDirsResult { ... } fn elect_leaders( &self, election_type: ElectionType, partitions: Option<HashSet<TopicPartition>>, ) -> ElectLeadersResult { ... } fn alter_partition_reassignments( &self, reassignments: &HashMap<TopicPartition, Option<NewPartitionReassignment>>, ) -> AlterPartitionReassignmentsResult { ... } fn list_partition_reassignments(&self) -> ListPartitionReassignmentsResult { ... } fn list_partition_reassignments_with_partitions( &self, partitions: HashSet<TopicPartition>, ) -> ListPartitionReassignmentsResult { ... } fn list_partition_reassignments_with_options( &self, options: ListPartitionReassignmentsOptions, ) -> ListPartitionReassignmentsResult { ... } fn list_offsets( &self, topic_partition_offsets: &HashMap<TopicPartition, OffsetSpec>, ) -> ListOffsetsResult { ... } fn list_groups(&self) -> ListGroupsResult { ... } fn describe_consumer_groups( &self, group_ids: &[String], ) -> DescribeConsumerGroupsResult { ... } fn describe_classic_groups( &self, group_ids: &[String], ) -> DescribeClassicGroupsResult { ... } fn list_consumer_group_offsets_with_group_id( &self, group_id: &str, ) -> ListConsumerGroupOffsetsResult { ... } fn list_consumer_group_offsets_with_group_id_options( &self, group_id: &str, options: ListConsumerGroupOffsetsOptions, ) -> ListConsumerGroupOffsetsResult { ... } fn list_consumer_group_offsets_with_group_specs( &self, group_specs: &HashMap<String, ListConsumerGroupOffsetsSpec>, ) -> ListConsumerGroupOffsetsResult { ... } fn alter_consumer_group_offsets( &self, group_id: &str, offsets: &HashMap<TopicPartition, OffsetAndMetadata>, ) -> AlterConsumerGroupOffsetsResult { ... } fn delete_consumer_group_offsets( &self, group_id: &str, partitions: &HashSet<TopicPartition>, ) -> DeleteConsumerGroupOffsetsResult { ... } fn delete_consumer_groups( &self, group_ids: &[String], ) -> DeleteConsumerGroupsResult { ... } fn create_acls(&self, acls: &[AclBinding]) -> CreateAclsResult { ... } fn describe_acls(&self, filter: &AclBindingFilter) -> DescribeAclsResult { ... } fn delete_acls(&self, filters: &[AclBindingFilter]) -> DeleteAclsResult { ... } fn describe_client_quotas( &self, filter: &ClientQuotaFilter, ) -> DescribeClientQuotasResult { ... } fn alter_client_quotas( &self, entries: &[ClientQuotaAlteration], ) -> AlterClientQuotasResult { ... } fn describe_user_scram_credentials( &self, ) -> DescribeUserScramCredentialsResult { ... } fn describe_user_scram_credentials_with_users( &self, users: &[String], ) -> DescribeUserScramCredentialsResult { ... } fn alter_user_scram_credentials( &self, alterations: &[UserScramCredentialAlteration], ) -> AlterUserScramCredentialsResult { ... } fn create_delegation_token(&self) -> CreateDelegationTokenResult { ... } fn renew_delegation_token(&self, hmac: &[u8]) -> RenewDelegationTokenResult { ... } fn expire_delegation_token( &self, hmac: &[u8], ) -> ExpireDelegationTokenResult { ... } fn describe_delegation_token(&self) -> DescribeDelegationTokenResult { ... } fn describe_features(&self) -> DescribeFeaturesResult { ... } fn update_features( &self, feature_updates: &HashMap<String, FeatureUpdate>, ) -> Result<UpdateFeaturesResult, Error> { ... } fn close<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

The administrative client for Kafka, which supports managing and inspecting topics, brokers, configurations and records.

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

Per .claude/rules/admin-client.md §1, every RPC method is a plain sync fn that returns immediately with a *Result holding one KafkaFuture per key — the network I/O happens later on the background task, and the caller opts into blocking by awaiting the returned future(s). The only async fn is close, which (like Java’s close(Duration)) joins the background task.

Required Methods§

Source

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

Create a batch of new topics.

Corresponds to Admin.createTopics(Collection<NewTopic>, CreateTopicsOptions).

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).

Corresponds to Admin.deleteTopics(TopicCollection, DeleteTopicsOptions).

Source

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

List the topics available in the cluster.

Corresponds to Admin.listTopics(ListTopicsOptions).

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).

Corresponds to Admin.describeTopics(TopicCollection, DescribeTopicsOptions).

Source

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

Increase the number of partitions of the given topics.

The returned per-topic futures may complete exceptionally with, among others, InvalidPartitionsException if the requested partition count is less than or equal to the current partition count.

Corresponds to Admin.createPartitions(Map<String, NewPartitions>, CreatePartitionsOptions).

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.

Corresponds to Admin.deleteRecords(Map<TopicPartition, RecordsToDelete>, DeleteRecordsOptions).

Source

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

Describe the active producers for a set of topic partitions.

Corresponds to Admin.describeProducers(Collection<TopicPartition>, DescribeProducersOptions).

Source

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

Forcefully abort a transaction which is open on a topic partition.

Corresponds to Admin.abortTransaction(AbortTransactionSpec, AbortTransactionOptions).

Source

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

List the transaction states of the given transactional ids.

Corresponds to Admin.describeTransactions(Collection<String>, DescribeTransactionsOptions).

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.

Corresponds to Admin.fenceProducers(Collection<String>, FenceProducersOptions).

Source

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

List the transactions in the cluster (fans out to all brokers).

Corresponds to Admin.listTransactions(ListTransactionsOptions).

Source

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

Forcefully terminate an ongoing transaction for a given transactional id.

Corresponds to Admin.forceTerminateTransaction(String, TerminateTransactionOptions).

Source

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

Get information about the nodes in the cluster.

Corresponds to Admin.describeCluster(DescribeClusterOptions).

Source

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

Get the configuration for the specified resources.

Corresponds to Admin.describeConfigs(Collection<ConfigResource>, DescribeConfigsOptions).

Source

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

Incrementally update the configuration for the specified resources.

Corresponds to Admin.incrementalAlterConfigs(Map<ConfigResource, Collection<AlterConfigOp>>, AlterConfigsOptions).

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).

Corresponds to Admin.listConfigResources(Set<ConfigResource.Type>, ListConfigResourcesOptions).

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.

Corresponds to Admin.describeLogDirs(Collection<Integer>, DescribeLogDirsOptions).

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.

Corresponds to Admin.alterReplicaLogDirs(Map<TopicPartitionReplica, String>, AlterReplicaLogDirsOptions).

Source

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

Query the replica log directory information for the specified replicas.

Corresponds to Admin.describeReplicaLogDirs(Collection<TopicPartitionReplica>, DescribeReplicaLogDirsOptions).

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.

Corresponds to Admin.electLeaders(ElectionType, Set<TopicPartition>, ElectLeadersOptions).

Source

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

Change the partition reassignments for the given partitions.

A None value for a partition cancels an ongoing reassignment.

Corresponds to Admin.alterPartitionReassignments(Map<TopicPartition, Optional<NewPartitionReassignment>>, AlterPartitionReassignmentsOptions).

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).

Corresponds to Admin.listPartitionReassignments(Optional<Set<TopicPartition>>, ListPartitionReassignmentsOptions).

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.

Corresponds to Admin.listOffsets(Map<TopicPartition, OffsetSpec>, ListOffsetsOptions).

Source

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

List the groups available in the cluster.

Corresponds to Admin.listGroups(ListGroupsOptions).

Source

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

Describe some consumer groups in the cluster.

Corresponds to Admin.describeConsumerGroups(Collection<String>, DescribeConsumerGroupsOptions).

Source

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

Describe some classic groups in the cluster.

Corresponds to Admin.describeClassicGroups(Collection<String>, DescribeClassicGroupsOptions).

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.

Corresponds to Admin.listConsumerGroupOffsets(Map<String, ListConsumerGroupOffsetsSpec>, ListConsumerGroupOffsetsOptions).

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.

Corresponds to Admin.alterConsumerGroupOffsets(String, Map<TopicPartition, OffsetAndMetadata>, AlterConsumerGroupOffsetsOptions).

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.

Corresponds to Admin.deleteConsumerGroupOffsets(String, Set<TopicPartition>, DeleteConsumerGroupOffsetsOptions).

Source

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

Delete consumer groups from the cluster.

Corresponds to Admin.deleteConsumerGroups(Collection<String>, DeleteConsumerGroupsOptions).

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.

Corresponds to Admin.removeMembersFromConsumerGroup(String, RemoveMembersFromConsumerGroupOptions).

Source

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

Create ACLs.

Corresponds to Admin.createAcls(Collection<AclBinding>, CreateAclsOptions).

Source

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

Describe ACLs matching the provided filter.

Corresponds to Admin.describeAcls(AclBindingFilter, DescribeAclsOptions).

Source

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

Delete ACLs matching the provided filters.

Corresponds to Admin.deleteAcls(Collection<AclBindingFilter>, DeleteAclsOptions).

Source

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

Describe the client quotas matching the provided filter.

Corresponds to Admin.describeClientQuotas(ClientQuotaFilter, DescribeClientQuotasOptions).

Source

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

Alter the client quotas of one or more quota entities.

Corresponds to Admin.alterClientQuotas(Collection<ClientQuotaAlteration>, AlterClientQuotasOptions).

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.

Corresponds to Admin.describeUserScramCredentials(List<String>, DescribeUserScramCredentialsOptions).

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.

Corresponds to Admin.alterUserScramCredentials(List<UserScramCredentialAlteration>, AlterUserScramCredentialsOptions).

Source

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

Create a delegation token.

Corresponds to Admin.createDelegationToken(CreateDelegationTokenOptions).

Source

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

Renew a delegation token identified by its HMAC.

Corresponds to Admin.renewDelegationToken(byte[], RenewDelegationTokenOptions).

Source

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

Expire a delegation token identified by its HMAC.

Corresponds to Admin.expireDelegationToken(byte[], ExpireDelegationTokenOptions).

Source

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

Describe the delegation tokens matching the provided owners filter.

Corresponds to Admin.describeDelegationToken(DescribeDelegationTokenOptions).

Source

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

Describe the finalized and supported features of the cluster.

Corresponds to Admin.describeFeatures(DescribeFeaturesOptions).

Source

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

Apply the given feature updates.

Corresponds to Admin.updateFeatures(Map<String, FeatureUpdate>, UpdateFeaturesOptions).

Java throws IllegalArgumentException synchronously when the update map is empty or contains a blank feature name; per CLAUDE.md §12.2, that unchecked-but-recoverable throw becomes an Err here (the only admin RPC whose client-side validation can fail before the Call is enqueued).

§Errors

Returns Error::local_illegal_argument if feature_updates is empty or any feature name is blank.

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.

The bound is a guarantee, not a hint: this returns once timeout has elapsed whatever the background task is doing, mirroring the timed thread.join(waitTimeMs) that ends Java’s close. A task that has not finished by then is left running.

Corresponds to Admin.close(Duration); blocking in Java, so async in Rust (CLAUDE.md §11.4).

Provided Methods§

Source

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

Create a batch of new topics.

Corresponds to Admin.createTopics(Collection<NewTopic>).

Source

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

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

Corresponds to Admin.deleteTopics(TopicCollection).

Source

fn list_topics(&self) -> ListTopicsResult

List the topics available in the cluster.

Corresponds to Admin.listTopics().

Source

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

Describe some topics in the cluster, by name.

Corresponds to Admin.describeTopics(Collection<String>).

Source

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

Describe some topics in the cluster, by name.

Corresponds to Admin.describeTopics(Collection<String>, DescribeTopicsOptions), whose body wraps the names in a TopicCollection.

Source

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

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

Corresponds to Admin.describeTopics(TopicCollection).

Source

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

Increase the number of partitions of the given topics.

The returned per-topic futures may complete exceptionally with, among others, InvalidPartitionsException if the requested partition count is less than or equal to the current partition count.

Corresponds to Admin.createPartitions(Map<String, NewPartitions>).

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.

Corresponds to Admin.deleteRecords(Map<TopicPartition, RecordsToDelete>).

Source

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

Describe the active producers for a set of topic partitions.

Corresponds to Admin.describeProducers(Collection<TopicPartition>).

Source

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

Forcefully abort a transaction which is open on a topic partition.

Corresponds to Admin.abortTransaction(AbortTransactionSpec).

Source

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

List the transaction states of the given transactional ids.

Corresponds to Admin.describeTransactions(Collection<String>).

Source

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

Fence out all active producers that use any of the provided transactional ids.

Corresponds to Admin.fenceProducers(Collection<String>).

Source

fn list_transactions(&self) -> ListTransactionsResult

List the transactions in the cluster (fans out to all brokers).

Corresponds to Admin.listTransactions().

Source

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

Forcefully terminate an ongoing transaction for a given transactional id.

Corresponds to Admin.forceTerminateTransaction(String).

Source

fn describe_cluster(&self) -> DescribeClusterResult

Get information about the nodes in the cluster.

Corresponds to Admin.describeCluster().

Source

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

Get the configuration for the specified resources.

Corresponds to Admin.describeConfigs(Collection<ConfigResource>).

Source

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

Incrementally update the configuration for the specified resources.

Corresponds to Admin.incrementalAlterConfigs(Map<ConfigResource, Collection<AlterConfigOp>>).

Source

fn list_config_resources(&self) -> ListConfigResourcesResult

List all the config resources available in the cluster.

Corresponds to Admin.listConfigResources(). Java’s body passes an empty type set — meaning “all supported types” — alongside the fresh options instance, so this is not a plain no-options forward.

Source

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

Query the information of all log directories on the given set of brokers.

Corresponds to Admin.describeLogDirs(Collection<Integer>).

Source

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

Change the log directory for the specified replicas.

Corresponds to Admin.alterReplicaLogDirs(Map<TopicPartitionReplica, String>).

Source

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

Query the replica log directory information for the specified replicas.

Corresponds to Admin.describeReplicaLogDirs(Collection<TopicPartitionReplica>).

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.

Corresponds to Admin.electLeaders(ElectionType, Set<TopicPartition>).

Source

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

Change the partition reassignments for the given partitions.

A None value for a partition cancels an ongoing reassignment.

Corresponds to Admin.alterPartitionReassignments(Map<TopicPartition, Optional<NewPartitionReassignment>>).

Source

fn list_partition_reassignments(&self) -> ListPartitionReassignmentsResult

List all the current partition reassignments.

Corresponds to Admin.listPartitionReassignments().

Source

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

List the current partition reassignments for the given partitions.

Corresponds to Admin.listPartitionReassignments(Set<TopicPartition>).

Source

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

List all the current partition reassignments, with options.

Corresponds to Admin.listPartitionReassignments(ListPartitionReassignmentsOptions), whose body passes Optional.empty() for the partition set.

Source

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

List the offsets for the given partitions and offset specifications.

Corresponds to Admin.listOffsets(Map<TopicPartition, OffsetSpec>).

Source

fn list_groups(&self) -> ListGroupsResult

List the groups available in the cluster.

Corresponds to Admin.listGroups().

Source

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

Describe some consumer groups in the cluster.

Corresponds to Admin.describeConsumerGroups(Collection<String>).

Source

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

Describe some classic groups in the cluster.

Corresponds to Admin.describeClassicGroups(Collection<String>).

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.

Corresponds to Admin.listConsumerGroupOffsets(String).

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.

Corresponds to Admin.listConsumerGroupOffsets(String, ListConsumerGroupOffsetsOptions).

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.

Corresponds to Admin.listConsumerGroupOffsets(Map<String, ListConsumerGroupOffsetsSpec>).

Source

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

Alter offsets for a consumer group.

Corresponds to Admin.alterConsumerGroupOffsets(String, Map<TopicPartition, OffsetAndMetadata>).

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.

Corresponds to Admin.deleteConsumerGroupOffsets(String, Set<TopicPartition>).

Source

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

Delete consumer groups from the cluster.

Corresponds to Admin.deleteConsumerGroups(Collection<String>).

Source

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

Create ACLs.

Corresponds to Admin.createAcls(Collection<AclBinding>).

Source

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

Describe ACLs matching the provided filter.

Corresponds to Admin.describeAcls(AclBindingFilter).

Source

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

Delete ACLs matching the provided filters.

Corresponds to Admin.deleteAcls(Collection<AclBindingFilter>).

Source

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

Describe the client quotas matching the provided filter.

Corresponds to Admin.describeClientQuotas(ClientQuotaFilter).

Source

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

Alter the client quotas of one or more quota entities.

Corresponds to Admin.alterClientQuotas(Collection<ClientQuotaAlteration>).

Source

fn describe_user_scram_credentials(&self) -> DescribeUserScramCredentialsResult

Describe the SASL/SCRAM credentials for all users.

Corresponds to Admin.describeUserScramCredentials(). Java’s body passes a null user list; Rust spells “all users” as an empty slice — see describe_user_scram_credentials_with_users_options.

Source

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

Describe the SASL/SCRAM credentials for the given users.

Corresponds to Admin.describeUserScramCredentials(List<String>).

Source

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

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

Corresponds to Admin.alterUserScramCredentials(List<UserScramCredentialAlteration>).

Source

fn create_delegation_token(&self) -> CreateDelegationTokenResult

Create a delegation token.

Corresponds to Admin.createDelegationToken().

Source

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

Renew a delegation token identified by its HMAC.

Corresponds to Admin.renewDelegationToken(byte[]).

Source

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

Expire a delegation token identified by its HMAC.

Corresponds to Admin.expireDelegationToken(byte[]).

Source

fn describe_delegation_token(&self) -> DescribeDelegationTokenResult

Describe the delegation tokens matching the provided owners filter.

Corresponds to Admin.describeDelegationToken().

Source

fn describe_features(&self) -> DescribeFeaturesResult

Describe the finalized and supported features of the cluster.

Corresponds to Admin.describeFeatures().

Source

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

Apply the given feature updates.

Corresponds to Admin.updateFeatures(Map<String, FeatureUpdate>).

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.

Corresponds to Admin.close(), whose body waits Long.MAX_VALUE milliseconds; close_with_timeout clamps that to the same 365-day ceiling Java’s close(Duration) applies.

Implementors§