Add option to load offsets from a custom consumer group
mwylde opened this issue · comments
Currently, the Kafka consumer has two options for initializing offsets on a new pipeline: earliest
and latest
which have the same behavior as the corresponding values for the Kafka consumer 'auto.offset.reset` config.
We also allow users to set a custom consumer group, in which case we will commit offsets to that (which can be used for progress tracking), but we do not have an option to load offsets from an existing group on startup.
We should add a third option, group
to the offset enum here:
arroyo/connector-schemas/kafka/table.json
Line 19 in 0eb9d9e
which will then be handled in the consumer creation code:
arroyo/arroyo-worker/src/connectors/kafka/source/mod.rs
Lines 209 to 215 in 0eb9d9e
such that if it's set, we'll attempt to load the offsets from the group, or fail if there are no existing offsets.
Fixed by @harshit2283 in #480