[rabbitmq-discuss] Help with my priority queue design

yoav glazner yoavglazner at gmail.com
Tue Feb 22 20:54:43 GMT 2011


Hi,

I wanted to show my design for a priority based task queue and get some
insight from experts.

The client create a queue named: "some_tasks_to_work_on2" and put his tasks
there,
then it puts the following message in a queue named "batch_states":
[{batch="some_tasks_to_work_on2", priority=3}]
now each worker can take the status message and get tasks from the batch.
if a few batches are in the status message then the worker check the queue
by the priority order.

a worker should also return the status message after reading it so other
workers can also read it.
now this is needed because i want workers to be able to wake up any time and
get the latest status.
In this approch I can add new batches on the fly and also change priorities.

Do you think there is a better way to do it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110222/048ca582/attachment.htm>


More information about the rabbitmq-discuss mailing list