java – Kafka producer not able to send messages – Error: NOT_ENOUGH_REPLICAS

Recently our java application’s (microservice architecture based) Kafka cluster got migrated to a new one. From that point onwards, one of our microservice components (producer app) is not able to push messages to a particular topic. When we checked the log of the same, we were able to see the following lines.

[WARN ] [2023-05-12 06:27:33,137] [org.apache.kafka.clients.producer.internals.Sender] - txId_ [Producer clientId=producer-2] Got error produce response with correlation id 1172 on topic-partition mpi_mpi-random-fileuploadtst_patient_timeline-0, retrying (2147482478 attempts left). Error: NOT_ENOUGH_REPLICAS
[WARN ] [2023-05-12 06:27:33,239] [org.apache.kafka.clients.producer.internals.Sender] - txId_ [Producer clientId=producer-2] Got error produce response with correlation id 1173 on topic-partition mpi_mpi-random-fileuploadtst_patient_timeline-0, retrying (2147482477 attempts left). Error: NOT_ENOUGH_REPLICAS
[WARN ] [2023-05-12 06:27:33,340] [org.apache.kafka.clients.producer.internals.Sender] - txId_ [Producer clientId=producer-2] Got error produce response with correlation id 1174 on topic-partition mpi_mpi-random-fileuploadtst_patient_timeline-0, retrying (2147482476 attempts left). Error: NOT_ENOUGH_REPLICAS

tried searching the internet to find solutions for this, but was not able to reach any conclusions.

currently using spring-boot-starter-parent 2.7.11 (managing spring-kafka 2.8.11)

Any help would be greatly appreciated

Read more here: Source link