Results 1 to 3 of 3

Thread: Dynamic adjust instances of concurrentConsumers

Threaded View

  1. #1
    Join Date
    Nov 2012
    Posts
    18

    Question Dynamic adjust instances of concurrentConsumers

    I noticed that SimpleMessageListenerContainer has a property - concurrentConsumers; I use it to setting the count of concurrent consumers:
    Code:
      <rabbit:listener-container connection-factory="connectionFactory" message-converter="jsonMessageConverter" concurrency="5" >
        <rabbit:listener queues="aQueue" ref="messageConsumer" method="handleMessage" />
      </rabbit:listener-container>
    My question is, how can i dynamic adjusting the instance count of concurrentConsumers that based on queue depth(total count of message remaining in the queue)? when depth of aQueue is large, increasing the count of concurrentConsumers; when its small, decreasing it.

    Besides:how can i get queue depth using spring-amqp API?

    All reply will be appreciated.

    Regards.
    Last edited by Wuaner; Jan 3rd, 2013 at 09:46 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •