Class DockerKafkaController
- java.lang.Object
-
- io.debezium.testing.system.tools.kafka.DockerKafkaController
-
- All Implemented Interfaces:
KafkaController
public class DockerKafkaController extends Object implements KafkaController
This class provides control over Kafka instance deployed as DockerContainer- Author:
- Jakub Cechacek
-
-
Field Summary
Fields Modifier and Type Field Description private KafkaContainercontainerprivate static org.slf4j.LoggerLOGGER
-
Constructor Summary
Constructors Constructor Description DockerKafkaController(KafkaContainer container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBootstrapAddress()The Bootstrap address returned by this method may not be reachable form arbitrary network.KafkaContainergetContainer()StringgetPublicBootstrapAddress()The Bootstrap address returned by this method must be reachable form arbitrary network.booleanundeploy()Undeploy this Kafka clustervoidwaitForCluster()Waits for cluster to be available-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.debezium.testing.system.tools.kafka.KafkaController
getDefaultConsumerProperties
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
container
private final KafkaContainer container
-
-
Constructor Detail
-
DockerKafkaController
public DockerKafkaController(KafkaContainer container)
-
-
Method Detail
-
getContainer
public KafkaContainer getContainer()
-
getPublicBootstrapAddress
public String getPublicBootstrapAddress()
Description copied from interface:KafkaControllerThe Bootstrap address returned by this method must be reachable form arbitrary network.- Specified by:
getPublicBootstrapAddressin interfaceKafkaController- Returns:
- Publicly reachable Kafka Bootstrap Server address
-
getBootstrapAddress
public String getBootstrapAddress()
Description copied from interface:KafkaControllerThe Bootstrap address returned by this method may not be reachable form arbitrary network.- Specified by:
getBootstrapAddressin interfaceKafkaController- Returns:
- Kafka Bootstrap Server address
-
undeploy
public boolean undeploy()
Description copied from interface:KafkaControllerUndeploy this Kafka cluster- Specified by:
undeployin interfaceKafkaController- Returns:
- true on operation success
-
waitForCluster
public void waitForCluster()
Description copied from interface:KafkaControllerWaits for cluster to be available- Specified by:
waitForClusterin interfaceKafkaController
-
-