Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
Merge pull request #5 from miracum/configure-auto-offset-reset
Browse files Browse the repository at this point in the history
fix: made auto_offset_reset configurable
  • Loading branch information
chgl authored May 28, 2021
2 parents 2840449 + d9b466b commit 6da249f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ahd2fhir/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ class Settings(BaseSettings):
# that value. It can be adjusted even lower to control
# the expected time for normal rebalances.
kafka_heartbeat_interval_ms: int = 3000
kafka_auto_offset_reset: str = "earliest"
1 change: 1 addition & 0 deletions ahd2fhir/kafka_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ async def initialize_kafka(handler: ResourceHandler): # pragma: no cover
settings.kafka_input_topic,
loop=loop,
bootstrap_servers=settings.bootstrap_servers,
auto_offset_reset=settings.kafka_auto_offset_reset,
group_id=group_id,
max_poll_interval_ms=settings.kafka_max_poll_interval_ms, # 600 s = 10 min
max_poll_records=settings.kafka_max_poll_records,
Expand Down

0 comments on commit 6da249f

Please sign in to comment.