我无法理解一个场景,下面是我正在使用的配置:
应用程序.yml
server:
port: 8082
spring:
cloud:
stream:
instance-count: 1
bindings:
Shubham:
group: mygroup
binder: kafka
destination: topic3
consumer:
maxAttempts: 1
concurrency: 1
kafka:
binder:
brokers:
- localhost:9092
consumer-properties:
auto.offset.reset: latest
bindings:
Shubham:
consumer:
configuration:
max.poll.records: 3
应用程序属性
logging.level.org.springframework.kafka = DEBUG
spring.cloud.stream.kafka.bindings.Shubham.consumer.auto-commit-offset=true
spring.cloud.stream.kafka.bindings.Shubham.consumer.auto-commit-on-error=true
现在,当我运行spring引导应用程序时,如果在处理事件时发生任何错误,那么应用程序不会提交错误事件的偏移量,而是从kafka连续轮询。
此过程(poll->error->poll)发生9次,第10轮应用程序使用以下日志提交偏移量:
2020-12-15 13:54:56.654 ERROR 10316 --- [container-0-C-1] o.s.k.l.SeekToCurrentErrorHandler : Backoff FixedBackOff{interval=0, currentAttempts=10, maxAttempts=9} exhausted for ConsumerRecord(topic = topic3, partition = 0, leaderEpoch = 0, offset = 61, CreateTime = 1608020650164, serialized key size = -1, serialized value size = 6, headers = RecordHeaders(headers = [], isReadOnly = false), key = null, value = [B@ed77414)
使用spring云版本:hoxton.sr7
暂无答案!
目前还没有任何答案,快来回答吧!