RichardKnop / machinery

Machinery is an asynchronous task queue/job queue based on distributed message passing.
Mozilla Public License 2.0
7.52k stars 914 forks source link

AMQP: added custom delayed queue config #796

Closed surendratiwari3 closed 9 months ago

surendratiwari3 commented 9 months ago

Summary:

This pull request introduces a configurable option to specify a custom delayed queue in the AMQP configuration. The goal is to allow users to have greater flexibility in handling delayed tasks without the need to create multiple delayed queues in Machinery.

Changes:

Added a new configuration parameter DelayedQueue to the AMQP configuration. The DelayedQueue parameter allows users to set a custom name for the delayed queue.

Motivation:

Currently, Machinery create multiple queue when we choose task with retry or delayed task. This limited the scaleability when we have millions of delayed task.

Usages: This feature can be used if env variables AMQP_DELAYED_QUEUE is set else it will continued with current approach in both v1 and v2.

surendratiwari3 commented 9 months ago

@RichardKnop Please review and merge.