elsa v0.12.3 Elsa.Consumer.Worker
Defines the worker GenServer that is managed by the DynamicSupervisor. Workers are instantiated and assigned to a specific topic/partition and process messages according to the specified message handler module passed in from the manager before calling the ack function to notify the cluster the messages have been successfully processed.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for GenServer.handle_continue/2
.
Callback implementation for GenServer.init/1
.
Start the worker process and init the state with the given config.
Link to this section Types
init_opts()
init_opts() :: [ connection: Elsa.connection(), topic: Elsa.topic(), partition: Elsa.partition(), generation_id: non_neg_integer(), begin_offset: non_neg_integer(), handler: module(), handler_init_args: term(), config: :brod.consumer_options() ]
Link to this section Functions
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
handle_continue(atom, state)
Callback implementation for GenServer.handle_continue/2
.
init(init_args)
Callback implementation for GenServer.init/1
.
Start the worker process and init the state with the given config.