I am currently using Spring Integration and the application does the following for each message received from MQ
- read the message
- transform
- post transformed message to an Api
To increase throughput, I wanted to change to the following
- read the message
- transform
- post to a queue channel
- call a batch api with 10 transformed messages
<channel id="apiChannel">
<queue size="10"/>
</channel>
Would anyone be able to point me how I could implement this trigger, i.e wait for queue depth to be 10 or time from the 1st inserted msg is 2 seconds before calling a Service Activator with 10 messages?