Quantcast
Channel: Active questions tagged retry-logic - Stack Overflow
Viewing all articles
Browse latest Browse all 950

@KafkaListener idiomatic way of nack with retry counter

$
0
0

I have spring-kafka listener:

@KafkaListener(...)public void consume(UpdateEvent message, Acknowledgment ack) {    processor.process(message);    ack.acknowledge();}

Questions:

Questions:

  1. Since I have long-running requests, I want to be on the safe side and "fail fast" by sending a nack for every failed processing attempt. Is this an idiomatic approach in Kafka?
  2. I need a stateful counter per consumer group + partition. If I implement it myself, I would use ThreadLocal variables. Is there any built-in mechanism in Spring Kafka for this?

Viewing all articles
Browse latest Browse all 950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>