Skip to content

Commit

Permalink
feat: commit offsets on successfull read (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
aballiet authored Jan 9, 2025
1 parent 401c25b commit 35836b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bizon/connectors/sources/kafka/src/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ def read_topic(self, pagination: dict = None) -> SourceIteration:
records=[],
)

# Commit offsets so we keep track of conumer-group progress in Confluent Cloud
# It also allows us to leverage Datadog lag monitors
self.consumer.commit(asynchronous=False)

return SourceIteration(
next_pagination=self.topic_offsets.model_dump(),
records=records,
Expand Down

0 comments on commit 35836b1

Please sign in to comment.