Skip to content

How should I go about scheduling a large number of tasks? #3811

Answered by lukebakken
cmanallen asked this question in Questions
Discussion options

You must be logged in to vote

The suggestions in that CloudAMQP document are very good. Sharding, using multiple queues, etc can better use the server resources you have. If you are using a single queue that is a known anti-pattern.

You should send messages in a loop but be sure to use Publisher Confirmations. Your code should take into account how fast confirmations are coming back from RabbitMQ and rate-limit itself accordingly. A typical use pattern is to have a limit on an acceptable number of outstanding confirmations and as that limit is neared, slow down publishing.

You could also investigate if RabbitMQ Streams is a better fit for your use-case.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cmanallen
Comment options

@lukebakken
Comment options

Answer selected by cmanallen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants