dashbitco / broadway_kafka

A Broadway connector for Kafka

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backoff strategy

slashmili opened this issue · comments

commented

Once in a while during Kafka broker updates we get errors like this :

(RuntimeError cannot resolve begin offset (hosts=[{"broker1", 9096}, {"broker2", 9096}, {"broker13", 9096}] topic=my-topic partition=1). Reason: :not_leader_for_partition)

lib/broadway_kafka/brod_client.ex in BroadwayKafka.BrodClient.lookup_offset/5 at line 154
lib/broadway_kafka/producer.ex in anonymous fn/3 in BroadwayKafka.Producer.handle_info/2 at line 368
lib/enum.ex in Enum."-map/2-lists^map/1-0-"/2 at line 1658
lib/broadway_kafka/producer.ex in BroadwayKafka.Producer.handle_info/2 at line 358
lib/broadway/topology/producer_stage.ex in Broadway.Topology.ProducerStage.handle_info/2 at line 229
lib/gen_stage.ex in GenStage.noreply_callback/3 at line 2200
gen_server.erl in :gen_server.try_dispatch/4 at line 1123

We have like 20 topics which means we get lots of errors in our sentry.

I'd like to know if this project is open to to have backoff strategy something like BroadwayRabbitMQ.Backoff

PRs are definitely welcome! Thanks for asking @slashmili!