I have spring-kafka listener:
@KafkaListener(...)
public void consume(UpdateEvent message, Acknowledgment ack) {
processor.process(message);
ack.acknowledge();
}
Questions:
Questions:
- 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?
- 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?