swift-server / swift-kafka-client

Apache License 2.0
83 stars 24 forks source link

`storeMessageOffset`: ignore state error #129

Closed felixschlegel closed 1 year ago

felixschlegel commented 1 year ago

Motivation:

Previously, we failed the entire KafkaConsumer if storing a message offset through RDKafkaClient.storeMessageOffset failed because the partition the offset should be committed to was unassigned (which can happen during rebalance).

We should not fail the consumer when committing during rebalance.

The worst thing that could happen here is that storing the offset fails and we re-read a message, which is fine since KafkaConsumers with automatic commits are designed for at-least-once processing:

https://docs.confluent.io/platform/current/clients/consumer.html#offset-management

Modifications: