Hi!
MessageGroupCallback would do the trick but I haven't been able to reason out how that would work
Yes, it is a point to implement your requirements:
HTML Code:
<bean id="messageStore" class="org.springframework.integration.store.SimpleMessageStore">
<property name="expiryCallbacks" ref="expiryCallback"/>
</bean>
<bean id="expiryCallback" class="your.ExpiryCallbackImpl"/>
<bean id="reaper" class="org.springframework.integration.store.MessageGroupStoreReaper">
<property name="messageGroupStore" ref="messageStore"/>
<property name="timeout" value="10"/>
</bean>
Where
Code:
public static class ExpiryCallbackImpl implements MessageGroupCallback {
public void execute(MessageGroupStore messageGroupStore, MessageGroup group) {
if (group.getMessages() and etc.) {
messageGroupStore.removeMessageGroup(group.getGroupId());
}
}
}
HTH,
Artem