[rabbitmq-discuss] bulk loading

Matthias Radestock matthias at rabbitmq.com
Mon Aug 20 10:00:57 BST 2012


On 19/08/12 16:27, Jonathan Camp wrote:
> Is there a method for loading a static set of messages? I have a set
> of X million tasks that I need to load into various task queues on a
> regular interval (once a week). Rather than publish the same set one
> at a time, over and over again, I am hoping there is a way to do a
> bulk load.

What is wrong with "publish the same set one at a time"? It should be 
very little code, and it should be fast.

Anyway, why don't you get rabbit to reload the tasks every week for you?

You could configure the routing s.t. every task that is published ends 
up in two queues - the intended task queue and a (shared) "cron" queue. 
Set up the latter with a per-queue message ttl of one week and a dlx 
pointing to the same exchange the messages were published to initially.

It's possible that rabbit's dlx cycle detection prevents this sort of 
configuration, which would be a shame and s.t. we should change.



More information about the rabbitmq-discuss mailing list