View Source Fluvio.Producer (fluvio v0.2.4)

TopicProducer functionalities. This module is backed by a GenServer.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Flushes all the queued records in the producer batches.

Sends a list of string values or tuple key values to this producer's topic. flush/1 should be called to flush the records in the producer batches.

Sends a key value record to this producer's topic. flush/1 should be be called to flush the records in the producer batches.

Starts a Fluvio TopicProducer GenServer process linked to the current process.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec flush(pid()) :: {atom(), pid()}

Flushes all the queued records in the producer batches.

@spec send(pid(), bitstring()) :: {atom(), pid()}
@spec send(pid(), list()) :: list()

Sends a list of string values or tuple key values to this producer's topic. flush/1 should be called to flush the records in the producer batches.

@spec send(pid(), bitstring(), bitstring()) :: {atom(), pid()}

Sends a key value record to this producer's topic. flush/1 should be be called to flush the records in the producer batches.

Link to this function

start_link(config, gen_opts \\ [], native_mod \\ Fluvio.Native)

View Source
@spec start_link(%{topic: bitstring()}, list(), any()) :: GenServer.on_start()

Starts a Fluvio TopicProducer GenServer process linked to the current process.

Config example: %{topic: "some_topic", options: %{}}