zio / zio-kafka

A Kafka client for ZIO and ZIO Streams
https://zio.dev/zio-kafka
Apache License 2.0
337 stars 138 forks source link

Improve support and documentation for manual offsets #1135

Closed erikvanoosten closed 9 months ago

erikvanoosten commented 9 months ago

According to the javadoc of seek, when a given offset is invalid, it falls back to the auto.offset.reset configuration. In this change we allow the user to set that configuration when Manual offset retrieval is used. Furthermore, testing showed that we fall back to 'Auto' behavior when no offset is given.

This PR also contains a behavior change. For Manual offsets, when no offset is given by the user, before we would skip the records from the first poll. After this change those are no longer skipped.

In addition, add documentation on how to configure offset retrieval.

Note: this change is source compatible, but not binary compatible.