In my SpringBoot application I have written an aggregator as below. I want messages to be release immediately after 2 minutes has lapsed. But below code does not seem to work. However, when release-strategy is changed from "timoutReleaseStrategy' to "size() ==1" , messages are release one by one. However, I want all messages to be released after 2 minutes.
The spring version i am using is 5.3.20
<int:aggregator
output-channel="splitterInChannel"
send-partial-result-on-expiry="true"
message-store="customMessageStore"
correlation-strategy-expression="headers['type']
ref="taskAggregationService"
method="aggregateTask"
release-strategy-expression="timeoutReleaseStrategy"
expire-groups-upon-completion="true"
expire-groups-upon-timeout="true"
id="customAggregator"
input-channel="aggregatorInChannel" >
</int:aggregator>
<bean id="customMessageStore" class="org....SimpleMessageStore"/>
<bean id="timeoutReleaseStrategy" class="org....TimeoutCountSequenceSizeReleaseStrategy">
<constructor-arg name="threshold" value="100"/>
<constructor-arg name="timeout" value="120000"/> // 2 minutes
</bean>