Answer the question
In order to leave comments, you need to log in
RabbitMQ - how to make a delay in time?
How in MQ (rabbit or radish) to make tasks on time?
For example, I need a message to arrive exactly at such and such a time, or, for example, I need to make a timeout between the input and output of the message for 10 seconds.
And yet, how to shuffle the queue or select a random message?
Answer the question
In order to leave comments, you need to log in
It seems that queues are not really needed for your tasks. You need a task scheduler. And a random choice of the message can be done for example from a DB.
RabbitMQ: message delivery by...
but rabbitmq is not designed for that at all. Use cron or use some library to implement a daemon process with your own logic. And there, at the right time, send a message to the queue.
As for the "pull out the overhead message," I will not tell you, and I'm not even sure that it is possible.
Well, first of all, you can write to the queue with a delay. Of course, if you write in a normal language, in which this can be done without much difficulty. But this is not cool, since the machine can die and the message will not be recorded.
You can also add to each message the time at which it should be processed. Then, in fact, the same task with a delay is shifted to the worker, who clears the queue.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question