Skip to content

Commit 2b23065

Browse files
authored
Fix Kafka's inner communication bug introduced in #733 (#752)
1 parent 9045db6 commit 2b23065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/kafka/src/main/java/org/testcontainers/containers/KafkaContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected void doStart() {
6565
.withTarget(ZOOKEEPER_PORT, networkAlias);
6666

6767
proxy.start();
68-
withEnv("KAFKA_ADVERTISED_LISTENERS", "BROKER://" + networkAlias + ":" + KAFKA_PORT +",PLAINTEXT://" + proxy.getContainerIpAddress() + ":" + proxy.getFirstMappedPort());
68+
withEnv("KAFKA_ADVERTISED_LISTENERS", "BROKER://" + networkAlias + ":9092" + "," + getBootstrapServers());
6969

7070
if (externalZookeeperConnect != null) {
7171
withEnv("KAFKA_ZOOKEEPER_CONNECT", externalZookeeperConnect);

0 commit comments

Comments
 (0)