handle_batch, go back to Broadway module for more information.
handle_batch( batcher :: atom(), messages :: [Broadway.Message.t()], batch_info :: Broadway.BatchInfo.t(), context :: term() ) :: [Broadway.Message.t()]
Invoked to handle generated batches.
batcheris the key that defined the batcher. This value can be set in the
messagesis the list of
Broadway.Messagestructs in the incoming batch.
Broadway.BatchInfostruct containing extra information about the incoming batch.
contextis the user defined data structure passed to
It must return an updated list of messages. All messages received must be returned, otherwise an error will be logged. All messages after this step will be acknowledged according to their status.
In case of errors in this callback, the error will be logged and the whole batch will be failed. This callback also traps exits, so failures due to broken links between processes do not automatically cascade.
For more information on batching, see the "Batching" section in the