pub async fn create_new_topic<'a, C>(
client: &'a AdminClient<C>,
new_topic: &'a NewTopic<'a>
) -> Result<(), CreateTopicError>where
Creates a Kafka topic and waits for it to be reported in the broker metadata.
This function is a wrapper around
attempts to ensure the topic creation has propagated throughout the Kafka
cluster before returning. Kafka topic creation is asynchronous, so
attempting to consume from or produce to a topic immediately after its
creation can result in “unknown topic” errors.
This function does not return successfully unless it can find the metadata
for the newly-created topic in a call to
verify that the metadata reports the topic has the number of partitions
new_topic. Empirically, this seems to be the condition that
guarantees that future attempts to consume from or produce to the topic will