最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

apache kafka - @KafkaListener idiomatic way of nack with retry counter - Stack Overflow

programmeradmin2浏览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?
发布评论

评论列表(0)

  1. 暂无评论