Broadway.handle_batch

You're seeing just the callback handle_batch, go back to Broadway module for more information.
Link to this callback

handle_batch(batcher, messages, batch_info, context)

View Source (optional)

Specs

handle_batch(
  batcher :: atom(),
  messages :: [Broadway.Message.t()],
  batch_info :: Broadway.BatchInfo.t(),
  context :: term()
) :: [Broadway.Message.t()]

Invoked to handle generated batches.

It expects:

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 Broadway documentation.