0

The Spring AMQP doc says

"Since version 1.3.0, you can now dynamically adjust the concurrentConsumers property."

How do you do that? Thru environment variable or what? Elaborate? Thanks.

Glide
  • 20,235
  • 26
  • 86
  • 135

1 Answers1

1

Call setConcurrentConsumers() on the listener container...

if (logger.isDebugEnabled()) {
    logger.debug("Changing consumers from " + this.concurrentConsumers + " to " + concurrentConsumers);
}

The number of consumers will be increased or decreased as needed.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179