misha_cafex v0.0.6 Cafex.Producer
Kafka producer
Summary
Functions
Produce message to kafka server in the asynchronous way
Produce message to kafka server in the synchronous way
Types
option ::
{:client_id, Cafex.client_id} |
{:brokers, [Cafex.broker]} |
{:acks, -1..32767} |
{:batch_num, pos_integer} |
{:linger_ms, non_neg_integer}
options :: [option]
Options used by the start_link/2 functions
Functions
Specs
async_produce(pid :: pid, value :: binary, opts :: [Keyword.t]) :: :ok
Produce message to kafka server in the asynchronous way.
Options
See produce/3
Specs
produce(pid :: pid, value :: binary, opts :: [Keyword.t]) ::
:ok |
{:error, term}
Produce message to kafka server in the synchronous way.
Options
:keyThe key is an optional message key that was used for partition assignment. The key can benil.:partitionThe partition that data is being published to.:metadataThe metadata is used for partition in case of you wan’t to use key to do that.
Specs
start_link(topic_name :: String.t, opts :: options) :: GenServer.on_start