we have been using spring integration aggregator (version 5.1.4.RELEASE) in our project with the following configuration
<int:aggregator id="adobeJdbcAggregator" input-channel="aggregatorInputChannel"
output-channel="aggregatorOutputChannel"
correlation-strategy-expression="headers['eventType']"
message-store="ccsJdbcMessageStore"
send-partial-result-on-expiry="true"
group-timeout-expression="#{aggregateGroupTimeoutValue}"
expire-groups-upon-completion="true"
expire-groups-upon-timeout="true"
release-strategy-expression="#{aggregateReleaseStrategyExpressionValue}"
ref="ccsAggregatorBean"
method="processMessage"
auto-startup="true"/>
We occasionally notice some messages pending in INT_MESSAGE table as there are not supposed to be any pending after aggregation, could u suggest what could be the issue with it? Please note that I don't see any pending messages in either INT_MSG_GROUP or INT_GROUP_TO_MSG tables, we need to fix this issue where some messages are not aggregated.
Note:
We use group-timeout expression which expires the group based on a timestamp
When message group is expired, the
JdbcMessageStoreperforms these update queries:So, the first one belongs to the mentioned
INT_MESSAGE:Then as you notices an
INT_GROUP_TO_MESSAGEis cleaned from the group and so on for theINT_MESSAGE_GROUP.Therefore it is not clear how those messages can be stale, if they belong to any group you are cleaning from the store.
On the other hand the
INT_MESSAGEtable is used for other scenarios where plain message manipulation is necessary (no group correlation). See more info in docs: https://docs.spring.io/spring-integration/docs/current/reference/html/system-management.html#message-store. And aMessageStoreinterface. Therefore those messages could be stored from some other endpoints and they are not related to the mentioned aggregator anyway. For example Claim Check pattern uses a plainMessageStoreabstraction.