kafka_gen_stage v1.0.0 KafkaGenStage.Utils View Source

Various brod based helper apis over kafka.

Link to this section Summary

Types

Brod’s type for where to start reading in kafka topic

Kafka topic identifier

Functions

Default stats handler for periodic info-report about genstage status

If given function, function should return started kafka client ({:ok, pid}). Mostly used with fn -> :brod.start_link_client end

Resolve timestamp or semantic offset to real offset, when started brod client is given

Link to this section Types

Brod’s type for where to start reading in kafka topic.

Kafka topic identifier.

Link to this section Functions

Default stats handler for periodic info-report about genstage status.

Link to this function resolve_client(client) View Source
resolve_client(atom() | pid() | (() -> {:ok, atom() | pid()})) ::
  {:ok, atom() | pid()}

If given function, function should return started kafka client ({:ok, pid}). Mostly used with fn -> :brod.start_link_client end.

Link to this function resolve_offset(client, topic, partition, time) View Source
resolve_offset(atom(), topic(), integer(), begin_offset()) ::
  {:ok, integer()} | {:error, any()}

Resolve timestamp or semantic offset to real offset, when started brod client is given.