Interface: KyooJobNack()
Shape of the job negative acknowledgment function.
Remarks
In amqp, to re-enqueue the job at the end of the queue, we simply nack() and re-add it to the end of the queue. in bullmq, we use lifo
to re-enqueue at the beginning of the queue. in sqs, to re-enqueue the job at the end of the queue, we simply delete the message and re-add it to the end of the queue.
Due to limitations with amqp, we cannot requeue a job at the beginning of the queue if we also need to honor the maxAttempts. In this case, we will requeue the job at the end of the queue.
KyooJobNack(requeue?: boolean | "start" | "end"): Promise<void>;
Shape of the job negative acknowledgment function.
Parameters
Parameter | Type | Description |
---|---|---|
requeue ? | boolean | "start" | "end" | Whether to re-enqueue the job, and if so whether to requeue it at the start (next job to process) or end (last job to process) of the queue. If true , the job will be re-enqueued at the start (next job to process) of the queue. |
Returns
Promise
<void
>
Remarks
In amqp, to re-enqueue the job at the end of the queue, we simply nack() and re-add it to the end of the queue. in bullmq, we use lifo
to re-enqueue at the beginning of the queue. in sqs, to re-enqueue the job at the end of the queue, we simply delete the message and re-add it to the end of the queue.
Due to limitations with amqp, we cannot requeue a job at the beginning of the queue if we also need to honor the maxAttempts. In this case, we will requeue the job at the end of the queue.