Class AdminClientUtils
- java.lang.Object
-
- io.streamthoughts.azkarra.api.streams.admin.AdminClientUtils
-
public class AdminClientUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description AdminClientUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CompletableFuture<Collection<org.apache.kafka.clients.admin.TopicListing>>
listTopics(org.apache.kafka.clients.admin.AdminClient client)
static org.apache.kafka.clients.admin.AdminClient
newAdminClient(Conf config)
Creates a newAdminClient
instance.static void
waitForTopicToExist(org.apache.kafka.clients.admin.AdminClient client, Set<String> topics)
Wait indefinitely for the specified topics to be created on the cluster.
-
-
-
Method Detail
-
newAdminClient
public static org.apache.kafka.clients.admin.AdminClient newAdminClient(Conf config)
Creates a newAdminClient
instance.- Parameters:
config
- the client admin configuration.- Returns:
- the new
AdminClient
instance.
-
waitForTopicToExist
public static void waitForTopicToExist(org.apache.kafka.clients.admin.AdminClient client, Set<String> topics) throws InterruptedException
Wait indefinitely for the specified topics to be created on the cluster.- Parameters:
client
- theAdminClient
instance to be used.topics
- the list of topics name to be verified.- Throws:
InterruptedException
- while waiting for response from broker.
-
listTopics
public static CompletableFuture<Collection<org.apache.kafka.clients.admin.TopicListing>> listTopics(org.apache.kafka.clients.admin.AdminClient client)
-
-