off_broadway_kafka v0.2.2 OffBroadway.Kafka.ShowtimeHandler
Implements message handling using an opinionated
interpretation of Broadway for interaction with Kafka.
Intended for use in conjunction with the __using__
macro
provided by OffBroadway.Kafka
.
Assumes a single producer stage, preconfigured to use
the OffBroadway.Kafka.Producer
module and takes configuration
for additional Broadway elements via the Elsa configurations
passed through via the kafka_config/1
function and those passed
to Broadway via the broadway_config/1
functions defined in
the top-level module's behaviour callbacks.
Link to this section Summary
Functions
Callback implementation for Elsa.Consumer.MessageHandler.handle_messages/1
.
Delegates messages to the processed to the Producer
message handler
function.
Assumes a single producer stage using the OffBroadway.Kafka.Producer
module and collects other Broadway configuration passed in from the
calling application's implementation of the broadway_config/1
behaviour.
Retains a reference to the producer process in the state via Broadway's
built-in Broadway.Server.get_random_producer/1
function to allow passing
reference to the producer process to Elsa.
Link to this section Functions
generation_id()
handle_messages(messages)
Callback implementation for Elsa.Consumer.MessageHandler.handle_messages/1
.
handle_messages(messages, state)
Delegates messages to the processed to the Producer
message handler
function.
init(args)
init(keyword()) :: :ok
init(keyword()) :: :ok
Assumes a single producer stage using the OffBroadway.Kafka.Producer
module and collects other Broadway configuration passed in from the
calling application's implementation of the broadway_config/1
behaviour.
Retains a reference to the producer process in the state via Broadway's
built-in Broadway.Server.get_random_producer/1
function to allow passing
reference to the producer process to Elsa.