Class AdminUtils

java.lang.Object
org.apache.kafka.common.test.AdminUtils

public final class AdminUtils extends Object
  • Method Details

    • fetchOrWaitForLeader

      public static int fetchOrWaitForLeader(org.apache.kafka.clients.admin.Admin admin, String topic, int partitionNumber, long timeoutMs) throws InterruptedException
      Fetch the partition leader or wait until one is elected using the provided admin client.
      Throws:
      InterruptedException