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.AdminClientnewAdminClient(Conf config)Creates a newAdminClientinstance.static voidwaitForTopicToExist(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 newAdminClientinstance.- Parameters:
config- the client admin configuration.- Returns:
- the new
AdminClientinstance.
-
waitForTopicToExist
public static void waitForTopicToExist(org.apache.kafka.clients.admin.AdminClient client, Set<String> topics) throws InterruptedExceptionWait indefinitely for the specified topics to be created on the cluster.- Parameters:
client- theAdminClientinstance 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)
-
-