Class KafkaNewTopics
java.lang.Object
io.micronaut.configuration.kafka.admin.KafkaNewTopics
@Context
@Requires(bean=org.apache.kafka.clients.admin.AdminClient.class) @Requires(bean=org.apache.kafka.clients.admin.NewTopic.class)
public class KafkaNewTopics
extends Object
Creates Kafka topics via
AdminClient
.- Since:
- 5.2
- Author:
- Guillermo Calvo
-
Constructor Summary
ConstructorDescriptionKafkaNewTopics
(@NonNull AdminClient adminClient, @Nullable CreateTopicsOptions options, @NonNull List<NewTopic> topics) -
Method Summary
-
Constructor Details
-
KafkaNewTopics
public KafkaNewTopics(@NonNull @NonNull AdminClient adminClient, @Nullable @Nullable CreateTopicsOptions options, @NonNull @NonNull List<NewTopic> topics) - Parameters:
adminClient
- The Kafka admin client.options
- OptionalCreateTopicsOptions
.topics
- The list ofNewTopic
beans to create.
-
-
Method Details
-
getResult
- Returns:
- The
CreateTopicsResult
.
-