Skip to content

Commit

Permalink
Merge pull request #442 from EduardoGHdez/update-documentation-for-au…
Browse files Browse the repository at this point in the history
…to-offset-reset

Doc: Auto offset reset config
  • Loading branch information
joshuawscott authored Mar 10, 2022
2 parents 768a9cd + 7d87400 commit fb6b9b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ config :kafka_ex,
# Threshold number of messages consumed for GenConsumer to commit offsets
# to the broker.
commit_threshold: 100,
# The policy for resetting offsets when an :offset_out_of_range error occurs
# Options:
# - `:earliest` - Will move to the offset to the oldest available
# - `:latest` - Will move the offset to the most recent.
# - `:none` - The error will simply be raised
auto_offset_reset: :none,
# Interval in milliseconds to wait before reconnect to kafka
sleep_for_reconnect: 400,
# This is the flag that enables use of ssl
Expand Down
6 changes: 3 additions & 3 deletions lib/kafka_ex/gen_consumer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ defmodule KafkaEx.GenConsumer do
implemented, the default implementation calls to `init/2`, dropping the extra
arguments.
Both `:commit_interval` and `:commit_threshold` default to the application
config (e.g., `Application.get_env/2`) if that value is present, or the
stated default if the application config is not present.
**NOTE** `:commit_interval`, `auto_commit_reset` and `:commit_threshold` default to the
application config (e.g., `Application.get_env/2`) if that value is present, or the stated
default if the application config is not present.
Any valid options for `GenServer.start_link/3` can also be specified.
Expand Down

0 comments on commit fb6b9b1

Please sign in to comment.