diff --git a/docs/src/reference/docbook/aggregator.xml b/docs/src/reference/docbook/aggregator.xml index 4803064b41..b03ea9fd19 100644 --- a/docs/src/reference/docbook/aggregator.xml +++ b/docs/src/reference/docbook/aggregator.xml @@ -397,9 +397,17 @@ then you should simply provide an implementation of the ReleaseStrate - Indicates if partially aggregated messages should be released when their storage time has expired - (see MessageGroupStore.expireMessageGroups(long)). + + Indicates that expired messages should be aggregated and sent to the 'output-channel' or 'replyChannel' + once their containing MessageGroup is expired (see MessageGroupStore.expireMessageGroups(long)). + One way of expiring MessageGroups is by configuring a MessageGroupStoreReaper. + However MessageGroups can alternatively be expired by simply calling + MessageGroupStore.expireMessageGroup(groupId). That could be accomplished via a Control Bus operation + or by simply invoking that method if you have a reference to the MessageGroupStore instance. + Otherwise by itself this attribute has no behavior. It only serves as an indicator of what to do (discard or send to the output/reply + channel) with Messages that are still in the MessageGroup that is about to be expired. Optional. + Default - 'false'. diff --git a/spring-integration-core/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java b/spring-integration-core/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java index 37f2627c8f..7b6393c0c1 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java @@ -13,6 +13,10 @@ package org.springframework.integration.aggregator; +import java.util.Collection; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.BeanFactory; @@ -24,13 +28,13 @@ import org.springframework.integration.channel.NullChannel; import org.springframework.integration.core.MessageProducer; import org.springframework.integration.core.MessagingTemplate; import org.springframework.integration.handler.AbstractMessageHandler; -import org.springframework.integration.store.*; +import org.springframework.integration.store.MessageGroup; +import org.springframework.integration.store.MessageGroupCallback; +import org.springframework.integration.store.MessageGroupStore; +import org.springframework.integration.store.MessageStore; +import org.springframework.integration.store.SimpleMessageStore; import org.springframework.util.Assert; -import java.util.Collection; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - /** * Message handler that holds a buffer of correlated messages in a * {@link MessageStore}. This class takes care of correlated groups of messages diff --git a/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.0.xsd b/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.0.xsd index 8398e0c0c9..6973f199d7 100644 --- a/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.0.xsd +++ b/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.0.xsd @@ -2511,8 +2511,11 @@ Name of the header whose value will be used to route messages - Tells if partially aggregated messages should be released when their storage time had expired (see - MessageGroupStore.expireMessageGroups(long)) + Specifies whether messages that expired should be aggregated and sent to the 'output-channel' or 'replyChannel'. + Messages are expired when their containing MessageGroup expires. One of the ways of expiring MessageGroups is by + configuring a MessageGroupStoreReaper. However MessageGroups can alternatively be expired by simply calling + MessageGroupStore.expireMessageGroup(groupId). That could be accomplished via a ControlBus operation + or by simply invoking that method if you have a reference to the MessageGroupStore instance. diff --git a/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.1.xsd b/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.1.xsd index 41685c948b..b6ef2ab248 100644 --- a/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.1.xsd +++ b/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.1.xsd @@ -2499,8 +2499,11 @@ Name of the header whose value will be used to route messages - Tells if partially aggregated messages should be released when their storage time had expired (see - MessageGroupStore.expireMessageGroups(long)) + Specifies whether messages that expired should be aggregated and sent to the 'output-channel' or 'replyChannel'. + Messages are expired when their containing MessageGroup expires. One of the ways of expiring MessageGroups is by + configuring a MessageGroupStoreReaper. However MessageGroups can alternatively be expired by simply calling + MessageGroupStore.expireMessageGroup(groupId). That could be accomplished via a ControlBus operation + or by simply invoking that method if you have a reference to the MessageGroupStore instance.