0
votes

We have a Java application that gets messages from rabbitmq using Spring AMQP. For some of the queues, the number of consumers are not increasing resulting in slower messages delivery rate. e.g. even though the max consumers is set to 50, number of consumers remained 6 for most of the time for the load of 9000 messages.

However, this is not the case with other queues. i..e consumers count reached till 35 for other queues.

We are using SimpleMessageListenerContainer's setMaxConcurrentConsumers API for setting max consumers.

Can someone please help me to understand this?


Configuration:
number of concurrent consumers: 4
number of max concurrent consumers: 50

1

1 Answers

0
votes

When asking questions like this, you must always show configuration. Edit your question with complete details.

It depends on your configuration. By default, a new consumer is only added once every 10 seconds, and only if an existing consumer receives 10 messages without any gaps.

If that still doesn't answer your question, turn on DEBUG logging. If you can't figure it out from that, post the log (covering at least startConsumerMinInterval milliseconds) someplace like pastebin or dropbox.