Struct rdkafka::admin::AdminClient
source · [−]pub struct AdminClient<C: ClientContext> { /* private fields */ }
Expand description
A client for the Kafka admin API.
AdminClient
provides programmatic access to managing a Kafka cluster,
notably manipulating topics, partitions, and configuration paramaters.
Implementations
pub fn create_topics<'a, I>(
&self,
topics: I,
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<TopicResult>>> where
I: IntoIterator<Item = &'a NewTopic<'a>>,
pub fn create_topics<'a, I>(
&self,
topics: I,
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<TopicResult>>> where
I: IntoIterator<Item = &'a NewTopic<'a>>,
Creates new topics according to the provided NewTopic
specifications.
Note that while the API supports creating multiple topics at once, it is not transactional. Creation of some topics may succeed while others fail. Be sure to check the result of each individual operation.
pub fn delete_topics(
&self,
topic_names: &[&str],
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<TopicResult>>>
pub fn delete_topics(
&self,
topic_names: &[&str],
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<TopicResult>>>
Deletes the named topics.
Note that while the API supports deleting multiple topics at once, it is not transactional. Deletion of some topics may succeed while others fail. Be sure to check the result of each individual operation.
pub fn create_partitions<'a, I>(
&self,
partitions: I,
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<TopicResult>>> where
I: IntoIterator<Item = &'a NewPartitions<'a>>,
pub fn create_partitions<'a, I>(
&self,
partitions: I,
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<TopicResult>>> where
I: IntoIterator<Item = &'a NewPartitions<'a>>,
Adds additional partitions to existing topics according to the provided
NewPartitions
specifications.
Note that while the API supports creating partitions for multiple topics at once, it is not transactional. Creation of partitions for some topics may succeed while others fail. Be sure to check the result of each individual operation.
pub fn describe_configs<'a, I>(
&self,
configs: I,
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<ConfigResourceResult>>> where
I: IntoIterator<Item = &'a ResourceSpecifier<'a>>,
pub fn describe_configs<'a, I>(
&self,
configs: I,
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<ConfigResourceResult>>> where
I: IntoIterator<Item = &'a ResourceSpecifier<'a>>,
Retrieves the configuration parameters for the specified resources.
Note that while the API supports describing multiple configurations at once, it is not transactional. There is no guarantee that you will see a consistent snapshot of the configuration across different resources.
pub fn alter_configs<'a, I>(
&self,
configs: I,
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<AlterConfigsResult>>> where
I: IntoIterator<Item = &'a AlterConfig<'a>>,
pub fn alter_configs<'a, I>(
&self,
configs: I,
opts: &AdminOptions
) -> impl Future<Output = KafkaResult<Vec<AlterConfigsResult>>> where
I: IntoIterator<Item = &'a AlterConfig<'a>>,
Sets configuration parameters for the specified resources.
Note that while the API supports altering multiple resources at once, it is not transactional. Alteration of some resources may succeed while others fail. Be sure to check the result of each individual operation.
Trait Implementations
Creates a client from a client configuration. The default client context will be used. Read more
Creates a client from a client configuration and a client context.