WorkersQueue.prototype.dispatch(batch: IQueueMessageBatch): Promise<void>
Dispatches one delivered batch into the registered processors.
Every message is acked or retried exactly once:
- a body that is not a readable envelope →
retry(), because a message the consumer cannot route is a configuration problem and acking would discard it permanently and silently; - a name with no registered processor →
retry(), same reason; attemptspast the envelope'smaxAttempts→ack()without running the processor, since the caller asked for the job to stop;- a processor that throws →
retry(), leaving the queue's ownmax_retriesand dead-letter configuration to decide what happens next; - a processor that resolves →
ack().
batch: IQueueMessageBatch
The delivered batch