-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Module
Kafka
Proposal
org.testcontainers.kafka.ConfluentKafkaContainer
and org.testcontainers.kafka.KafkaContainer
don't support creating a Kafka cluster with multiple brokers using KRaft. However, deprecated org.testcontainers.containers.KafkaContainer
supports creating the Kafka cluster.
You have tests for the creation of the cluster using deprecated KafkaContainer here https://github.com/testcontainers/testcontainers-java/blob/main/examples/kafka-cluster/src/test/java/com/example/kafkacluster/KafkaContainerClusterTest.java
The problem is that method protected void configure()
sets only one broker into KAFKA_CONTROLLER_QUORUM_VOTERS
during the start of the container and it is not possible to override this env var with multiple brokers as it was possible in deprecated KafkaContainer
.
Please add support of the KRaft cluster to org.testcontainers.kafka.ConfluentKafkaContainer and org.testcontainers.kafka.KafkaContainer