From 779dc3967339578d2ed61d2ecff83df547cc81e5 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Fri, 16 Sep 2011 10:25:52 -0400 Subject: [PATCH] improved documentation for 'send-partial-result-on-expiry' --- docs/src/reference/docbook/aggregator.xml | 11 +++++++++-- .../aggregator/CorrelatingMessageHandler.java | 14 +++++++++----- .../config/xml/spring-integration-2.0.xsd | 7 +++++-- .../config/xml/spring-integration-2.1.xsd | 7 +++++-- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/docs/src/reference/docbook/aggregator.xml b/docs/src/reference/docbook/aggregator.xml index 4803064b41..885fbbac6a 100644 --- a/docs/src/reference/docbook/aggregator.xml +++ b/docs/src/reference/docbook/aggregator.xml @@ -397,9 +397,16 @@ 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 partially aggregated messages should be sent to the 'output-channel' or 'replyChannel' + once the particular MessageGroup had expired (see MessageGroupStore.expireMessageGroups(long)). One of the ways of expiring MessageGroups is by + configuring MessageGroupStoreReaper. However since MessageGroups are expired by calling + MessageGroupStore.expireMessageGroup(groupId), MessageGroupStoreReaper is not the only option and can be + accomplished via ControlBus or by simply invoking a method on MessageGroupStore if you have reference to its instance. + Otherwise by itself this attribute has no behavior. It only serves as an indicator of what to do (drop 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..54ce3ac862 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)) + Tells that partially aggregated messages should be sent to the 'output-channel' or 'replyChannel' + once the particular MessageGroup had expired. One of the ways of expiring MessageGroups is by + configuring MessageGroupStoreReaper. However since MessageGroups are expired by calling + MessageGroupStore.expireMessageGroup(groupId), MessageGroupStoreReaper is not the only option and can be + accomplished via ControlBus or by simply invoking a method on MessageGroupStore if you have reference to its 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..5a14cf2090 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)) + Tells that partially aggregated messages should be sent to the 'output-channel' or 'replyChannel' + once the particular MessageGroup had expired. One of the ways of expiring MessageGroups is by + configuring MessageGroupStoreReaper. However since MessageGroups are expired by calling + MessageGroupStore.expireMessageGroup(groupId), MessageGroupStoreReaper is not the only option and can be + accomplished via ControlBus or by simply invoking a method on MessageGroupStore if you have reference to its instance.