[rabbitmq-discuss] Multiple consumers

Ben Hood 0x6e6562 at gmail.com
Sun Jul 8 12:20:50 BST 2007


When I start a consumer, I assume that the amount of concurrency you
can get on consumption is the amount of consumer threads that you
start to listen on a queue.

That is, if I am using the java client, if I only register one
consumer, then the consumption of messages to a topic is going to be
single threaded.

Is this

a) because the client doesn't execute the handleDelivery callback in a
worker thread,

b) this is a concern of the consumer, and so it should spawn new
threads if it wants to consume messages concurrenly

c) basic consume is the wrong mechanism for a competing consumer
design pattern, i.e. you should try polling using a basic get, for
example

?

I assume also that the same logic applies if you implement your
consumers using the native erlang API.

BTW, what things do you have to consider when using the native API, if
you want to program your application in erlang. As far as I can tell,
it's pretty straightforward with the semantics being the same as the
java API except that you don't have the framing in the middle.




More information about the rabbitmq-discuss mailing list