public class KafkaContainer extends org.testcontainers.containers.GenericContainer<KafkaContainer>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
externalZookeeperConnect |
static int |
KAFKA_PORT |
protected org.testcontainers.containers.SocatContainer |
proxy |
static int |
ZOOKEEPER_PORT |
| Constructor and Description |
|---|
KafkaContainer() |
KafkaContainer(java.lang.String confluentPlatformVersion) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
java.lang.String |
getBootstrapServers() |
void |
stop() |
KafkaContainer |
withEmbeddedZookeeper() |
KafkaContainer |
withExternalZookeeper(java.lang.String connectString) |
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, apply, canEqual, configure, containerIsStarted, containerIsStarting, copyFileFromContainer, copyFileToContainer, createVolumeDirectory, equals, execInContainer, execInContainer, failed, fetchDockerDaemonInfo, finished, getBinds, getCommandParts, getContainerId, getContainerInfo, getContainerName, getCopyToFileContainerPathMap, getCreateContainerCmdModifiers, getDockerClient, getDockerDaemonInfo, getDockerImageName, getEnv, getEnvMap, getExposedPorts, getExtraHosts, getImage, getIpAddress, getLabels, getLinkedContainers, getLivenessCheckPort, getLivenessCheckPortNumbers, getLivenessCheckPorts, getLogConsumers, getNetwork, getNetworkAliases, getNetworkMode, getPortBindings, getStartupAttempts, getStartupCheckStrategy, getTestHostIpAddress, getVolumesFroms, getWaitStrategy, getWorkingDirectory, hashCode, isPrivilegedMode, logger, setBinds, setCommand, setCommand, setCommandParts, setCopyToFileContainerPathMap, setDockerImageName, setEnv, setExposedPorts, setExtraHosts, setImage, setLabels, setLinkedContainers, setLogConsumers, setNetwork, setNetworkAliases, setNetworkMode, setPortBindings, setPrivilegedMode, setStartupAttempts, setStartupCheckStrategy, setVolumesFroms, setWaitStrategy, setWorkingDirectory, start, starting, succeeded, toString, waitingFor, waitUntilContainerStarted, withClasspathResourceMapping, withClasspathResourceMapping, withCommand, withCommand, withCopyFileToContainer, withCreateContainerCmdModifier, withEnv, withEnv, withExposedPorts, withExtraHost, withFileSystemBind, withLabel, withLabels, withLogConsumer, withMinimumRunningDuration, withNetwork, withNetworkAliases, withNetworkMode, withPrivilegedMode, withStartupAttempts, withStartupCheckStrategy, withStartupTimeout, withVolumesFrom, withWorkingDirectoryclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBindpublic static final int KAFKA_PORT
public static final int ZOOKEEPER_PORT
protected java.lang.String externalZookeeperConnect
protected org.testcontainers.containers.SocatContainer proxy
public KafkaContainer()
public KafkaContainer(java.lang.String confluentPlatformVersion)
public KafkaContainer withEmbeddedZookeeper()
public KafkaContainer withExternalZookeeper(java.lang.String connectString)
public java.lang.String getBootstrapServers()
protected void doStart()
doStart in class org.testcontainers.containers.GenericContainer<KafkaContainer>public void stop()
stop in interface org.testcontainers.lifecycle.Startablestop in class org.testcontainers.containers.GenericContainer<KafkaContainer>