Skip to content

Commit

Permalink
pass SSL configurations when validating offset (#80)
Browse files Browse the repository at this point in the history
I'm also reverting the previous PR, where we removed the explicit
pattern matching on the offset out of range
  • Loading branch information
juanperi committed Mar 1, 2022
1 parent bf745c8 commit 61bf8b7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/broadway_kafka/brod_client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,11 @@ defmodule BroadwayKafka.BrodClient do
if current_offset == :undefined do
lookup_offset(config.hosts, topic, partition, policy, config.client_config)
else
case :brod.fetch(config.hosts, topic, partition, current_offset) do
case :brod.fetch({config.hosts, config.client_config}, topic, partition, current_offset) do
{:ok, _} ->
current_offset

# We are looking for :offset_out_of_range but this may fail
# in earlier Kafka versions, so we perform a catch-all.
{:error, _} ->
{:error, :offset_out_of_range} ->
lookup_offset(config.hosts, topic, partition, policy, config.client_config)
end
end
Expand Down

0 comments on commit 61bf8b7

Please sign in to comment.