View Source Fluvio.Consumer (fluvio v0.2.4)
PartitionConsumer functionalities. This module is backed by a GenServer.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Starts a Fluvio PartitionConsumer GenServer process linked to the current process.
Invokes the given func/1 for each result in the stream continuously.
Gets next record of the stream. If you want to traverse continuously the stream, you
can call stream_each/3
, or alternatively recursively call this function.
Unfolds the infinite stream lazily.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec start_link(map(), list(), any()) :: GenServer.on_start()
Starts a Fluvio PartitionConsumer GenServer process linked to the current process.
Invokes the given func/1 for each result in the stream continuously.
@spec stream_next(pid(), integer()) :: {:ok, %Fluvio.Record{ key: term(), offset: term(), partition: term(), timestamp: term(), value: term() }} | {:stop_next, :stop_next} | {:error, bitstring()}
Gets next record of the stream. If you want to traverse continuously the stream, you
can call stream_each/3
, or alternatively recursively call this function.
Unfolds the infinite stream lazily.
timeout_iter_ms is a low-level iteration timeout in ms to avoid blocking the DirtyIO Rust NIF for too long.