[rabbitmq-discuss] Creating New Consumers When a Consumer Dies Prematurely

Francesco Mazzoli francesco at rabbitmq.com
Wed Jul 18 14:02:06 BST 2012


Hi Justin,
At Tue, 17 Jul 2012 10:47:53 -0700 (PDT),
Justin Field wrote:
> Hello,
> 
> I am trying to use rabbitMQ to rebuild complete index's from a database with
> 800,000+ entries to new databases that stores the data differently.  My goal
> is to have
> 
>   • 1 Producer that sends msgs to the queue.
>   • A fixed number of consumers to process the messages from the queue.
>   • Make new consumers to replace any consumers that prematurely die.
> 
> I did some research and wanted to use newFixedThreadPool from the Executers
> Class but I am not sure how to go about it, or if it is possible to use with
> rabbitMQ.
> 
> [...]

We do not currently use the Executors framework in our Java client, and it looks
like it would be a reasonable solution - I don't see any reason why you would
not be able to use it with our client. I would suggest to look at the javadoc
page (
http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html )
for the Executors class, since your doubts are probably answered there and this
mailing list is not the right outlet to talk about the Java standard APIs.

--
Francesco * Often in error, never in doubt


More information about the rabbitmq-discuss mailing list