I am using
Spring Integration 4.1.2.RELEASE
Spring AMQP 1.4.3.RELEASE
I have an AMQP inbound channel adapter and a ThreadPoolTaskExecutor configured like this:
<task:executor id="exec.newItems" pool-size="5" />
<int-amqp:inbound-channel-adapter
connection-factory="amqpConnectionFactory" auto-startup="true"
queue-names="#{newItemsQueueName}"
channel="newItems.payloadType.routingChannel"
message-converter="jsonMessageConverter"
acknowledge-mode="AUTO" error-channel="errorChannel"
concurrent-consumers="5"
mapped-request-headers="*"
channel-transacted="false"
task-executor="exec.newItems"
/>
I would like to know what the relationship is between the value set for concurrent-consumers in the AMQP inbound channel adapter and the pool-size in the task executor configuration.
Here is what I observed by using the JVM Monitor plugin in Eclipse.
If concurrent-consumers is greater than pool-size and pool-size is x, then x threads are created but they are in the blocked state and messages are not processed.
If concurrent-consumers is equal to pool-size and pool-size is x, then x threads are created and messages are processed.
If concurrent-consumers is less than pool-size and concurrent-consumers is y, then y threads are created and messages are processed.
I am thinking that concurrent-consumers might be setting the maximum pool size on the executor. Is this an accurate observation?