[rabbitmq-discuss] Process N messages / VM concurrently

Joern opendev at gmail.com
Fri Jul 4 11:54:09 BST 2008


Hi Ben,

2008/7/3 Ben Hood <0x6e6562 at gmail.com>:

> I think I may have misunderstood your question. Were you perhaps
> referring to the QueueingConsumer class that buffers messages into a
> client side queue?

Yes. I wrote BlockingConsumer but meant QueueingConsumer.

> I'm not sure about the Executor framework but I think one thing that
> you may want to consider is binding one AMQP channel to each worker
> thread. The connection is thread safe and hence can be shared, but the
> channel is designed to be the smallest unit of parallelism.
> Furthermore, they are not threadsafe for this very reason.

Yes, I was aware of that. But hence Executor implementations use
concurrent queues (and QueueingConsumer does also) I was thinking
about using a single channel and some Executor instance. As far as I
understand there is no real benefit in using N channels for N workers
- the channel model seems to be there to multiplex N AMQP connections
into one logical i.e. TCP/IP connection.

Best regards,


Joern
--




More information about the rabbitmq-discuss mailing list