charithe/kafka-junit

EphemeralKafkaCluster with more than 2 brokers fails with NOT_ENOUGH_REPLICAS error

Closed this issue · 1 comments

ohumi commented

When I create cluster with more 2 brokers cluster = EphemeralKafkaCluster.create(3); it starts but on sending messages ends with tons of error messages:
[data-plane-kafka-request-handler-4] ERROR kafka.server.ReplicaManager - [ReplicaManager broker=2] Error processing append operation on partition dlq_topic-0 org.apache.kafka.common.errors.NotEnoughReplicasException: The size of the current ISR Set(2) is insufficient to satisfy the min.isr requirement of 2 for partition dlq_topic-0 and [kafka-producer-network-thread | kafka-junit] WARN org.apache.kafka.clients.producer.internals.Sender - [Producer clientId=kafka-junit, transactionalId=INTEGRATIONS_TRANSACTION_ID] Got error produce response with correlation id 578 on topic-partition dlq_topic-0, retrying (2147483173 attempts left). Error: NOT_ENOUGH_REPLICAS

How I should configure cluster to support transactions?

ohumi commented

OK, got the solution - with Cluster with more than 2 Brokers topics can't be auto created.
Call to cluster.createTopics(...) is required.

Closing as resolved