db2kafka v0.1.0 Db2Kafka.TopicHealthTracker
This module contains a GenServer that can be used to track per-topic health. When writing to Kafka,
the result of the operation can be sent here through the report_partition_ok
and report_partition_error
messages (which are processed async). The GenServer keeps track of partitions across a topic, and whenever
a state is reached that no partitions are reported healthy, the process will kill itself.
Used in a supervisor hierarchy, this should trigger a reset of the Kafka client which may help in fixing the underlying issue by reconnecting, etcetera.
Summary
Types
t()
t() :: %Db2Kafka.TopicHealthTracker{partitions_status: %{optional(non_neg_integer) => non_neg_integer}, topic: String.t}