Broadway.Message.put_batch_key
You're seeing just the function
put_batch_key
, go back to Broadway.Message module for more information.
Specs
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.