0

I am using @trasactional in my Kafka Consumer. In that same method (marked with @transactional), I am doing some DB transaction. In case of DB transaction failure, my consumer try to consume the message 10 times & after that throws "Backoff FixedBackOff {interval=0, currentAttempts=10, maxAttempts=9} exhausted for consumerDetails" exception.

 @Transactional
      @KafkaListener(topics = "xyz") 
      public void  consume(final ConsumerDetails consumerDetail) {
     System.out.println("received key: [" + consumerDetail.key() + "] and value: [" + consumerDetail.value() + "]"); System.out.println(
     "consumer processing done");
     throw new RuntimeException();
      }

Is there any way that after fixing db issue, I can make my consumer to consume same message from Kafka topic? or does this exception "Backoff FixedBackOff", means that I lost that message?

user5402945
  • 165
  • 4
  • 11

0 Answers0