Announcement Announcement Module
Collapse
No announcement yet.
Dynamic scaling of consumer threads in the future? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic scaling of consumer threads in the future?

    Are there any plans to support dynamic scaling of the consumers with Spring AMQP? Currently there is just the configurable concurrentConsumers in the SimpleMessageListenerContainer, which creates all of the threads up front. Having a maxConcurrentConsumers similar to what is provided with the JMS DefaultMessageListenerContainer which facilitates dynamic scaling of the threads would be great.

  • #2
    Hi!

    Let's investigate it:
    1. SimpleMessageListenerContainer#concurrentConsumers isn't final and has its own setter. So, you always can change at runtime its value via bean reference.
    2. SimpleMessageListenerContainer is SmartLifecycle, so its 'life' can be controlled via start()/stop() methods.
    And the SimpleMessageListenerContainer re-init consumer instances after restart based on new concurrentConsumers count.

    Take care,
    Artem

    Comment


    • #3
      Yes, that works (stop, change setting, start), but some form of dynamic scaling might be a nice feature for the upcoming 1.2 release.

      Please feel free open a 'New Feature' JIRA issue. https://jira.springsource.org/browse/AMQP

      Comment


      • #4
        Thanks very much. I created a new feature JIRA issue here: https://jira.springsource.org/browse/AMQP-306

        Brian

        Comment

        Working...
        X