public class KafkaContainer extends org.testcontainers.containers.GenericContainer<KafkaContainer>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
externalZookeeperConnect |
static int |
KAFKA_PORT |
static int |
ZOOKEEPER_PORT |
Constructor and Description |
---|
KafkaContainer() |
KafkaContainer(java.lang.String confluentPlatformVersion) |
Modifier and Type | Method and Description |
---|---|
protected void |
containerIsStarting(com.github.dockerjava.api.command.InspectContainerResponse containerInfo,
boolean reused) |
protected void |
doStart() |
java.lang.String |
getBootstrapServers() |
org.testcontainers.containers.Network |
getNetwork() |
KafkaContainer |
withEmbeddedZookeeper() |
KafkaContainer |
withExternalZookeeper(java.lang.String connectString) |
KafkaContainer |
withNetwork(org.testcontainers.containers.Network network) |
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, apply, canBeReused, configure, containerIsCreated, containerIsStarted, containerIsStarted, containerIsStarting, containerIsStopped, containerIsStopping, copyFileFromContainer, copyFileFromContainer, copyFileToContainer, copyFileToContainer, createVolumeDirectory, dependsOn, dependsOn, equals, execInContainer, execInContainer, failed, fetchDockerDaemonInfo, finished, getBinds, getCommandParts, getContainerId, getContainerInfo, getContainerName, getCopyToFileContainerPathMap, getCreateContainerCmdModifiers, getDependencies, getDockerClient, getDockerDaemonInfo, getDockerImageName, getEnv, getEnvMap, getExposedPorts, getExtraHosts, getImage, getIpAddress, getLabels, getLinkedContainers, getLivenessCheckPort, getLivenessCheckPortNumbers, getLivenessCheckPorts, getLogConsumers, getNetworkAliases, getNetworkMode, getPortBindings, getShmSize, getStartupAttempts, getStartupCheckStrategy, getTestHostIpAddress, getTmpFsMapping, getVolumesFroms, getWaitStrategy, getWorkingDirectory, hashCode, isPrivilegedMode, isShouldBeReused, logger, setBinds, setCommand, setCommand, setCommandParts, setCopyToFileContainerPathMap, setDockerImageName, setEnv, setExposedPorts, setExtraHosts, setImage, setLabels, setLinkedContainers, setLogConsumers, setNetwork, setNetworkAliases, setNetworkMode, setPortBindings, setPrivilegedMode, setShmSize, setStartupAttempts, setStartupCheckStrategy, setTmpFsMapping, setVolumesFroms, setWaitStrategy, setWorkingDirectory, start, starting, stop, succeeded, toString, waitingFor, waitUntilContainerStarted, withClasspathResourceMapping, withClasspathResourceMapping, withCommand, withCommand, withCopyFileToContainer, withCreateContainerCmdModifier, withEnv, withEnv, withExposedPorts, withExtraHost, withFileSystemBind, withImagePullPolicy, withLabel, withLabels, withLogConsumer, withMinimumRunningDuration, withNetworkAliases, withNetworkMode, withPrivilegedMode, withReuse, withSharedMemorySize, withStartupAttempts, withStartupCheckStrategy, withStartupTimeout, withTmpFs, withVolumesFrom, withWorkingDirectory
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBind
public static final int KAFKA_PORT
public static final int ZOOKEEPER_PORT
protected java.lang.String externalZookeeperConnect
public KafkaContainer()
public KafkaContainer(java.lang.String confluentPlatformVersion)
public KafkaContainer withNetwork(org.testcontainers.containers.Network network)
withNetwork
in interface org.testcontainers.containers.Container<KafkaContainer>
withNetwork
in class org.testcontainers.containers.GenericContainer<KafkaContainer>
public org.testcontainers.containers.Network getNetwork()
getNetwork
in class org.testcontainers.containers.GenericContainer<KafkaContainer>
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>
protected void containerIsStarting(com.github.dockerjava.api.command.InspectContainerResponse containerInfo, boolean reused)
containerIsStarting
in class org.testcontainers.containers.GenericContainer<KafkaContainer>