Announcement Announcement Module
No announcement yet.
What's the difference between concurrentConsumers and blockingQueueConsumerCapacity? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • What's the difference between concurrentConsumers and blockingQueueConsumerCapacity?

    These are both properties on the SimpleMessageListenerContainer and I'm wondering how to configure it so there are in essence multiple consumers that consume different messages on the same queue. This is illustrated under the "Work Distribution" heading in the "Understanding AMQP, the protocol used by RabbitMQ" blog post:

    I first configured my listener container by setting concurrentConsumers to 2 but that cause the same messages to be consumed concurrently Should I instead be setting blockingQueueConsumerCapacity to a number greater than 1 to consume multiple messages at once?

    I'd also be interested in any rules of thumb for these numbers since I want to maximize the number of consumers per machine.

    Last edited by digitalsanctum; Aug 24th, 2010, 11:21 AM.

  • #2
    I got the desired behavior by using unique queue names, using a Fanout exchange, and setting concurrentConsumers to something greater than 1. I was getting confused because it turns out there's another issue with the JdbcPollingChannelAdapter which is creating duplicate messages:

    Although I figured this out, it would be nice to have another example showing how to setup the "work distribution" pattern which I suspect is one of the more popular uses.