You're seeing just the function put_batch_key, go back to Broadway.Message module for more information.
Link to this function

put_batch_key(message, batch_key)

View Source


put_batch_key(message :: t(), batch_key :: term()) :: t()

Defines the message batch key.

The batch key identifies the batch the message belongs to, within a given batcher. Each batcher then groups batches with the same batch_key, with size of at most batch_size within period batch_timeout. Both batch_size and batch_timeout are managed per batch key, so a batcher is capable of grouping multiple batch keys at the same time, regardless of the concurrency level.

If a given batcher has multiple batch processors (concurrency > 1), all messages with the same batch key are routed to the same processor. So different batch keys may run concurrently but the same batch key is always run serially and in the same batcher processor.