Annotation Type Aggregator
@Target({METHOD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
public @interface Aggregator
Indicates that a method is capable of aggregating messages.
A method annotated with @Aggregator may accept a collection of Messages or Message payloads and should return a single Message or a single Object to be used as a Message payload.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringautoStartupTheSmartLifecycleautoStartupoption.java.lang.StringdiscardChanneljava.lang.StringinputChanneljava.lang.StringoutputChanneljava.lang.StringphaseSpecify aSmartLifecyclephaseoption.Poller[]pollerjava.lang.StringsendPartialResultsOnExpirySpecify whether messages that expired should be aggregated and sent to theoutputChannel()orreplyChannelfrom message headers.java.lang.StringsendTimeoutSpecify the maximum amount of time in milliseconds to wait when sending a replyMessageto theoutputChannel().
-
Element Details
-
inputChannel
java.lang.String inputChannel- Returns:
- The channel name for receiving messages to be aggregated
- Default:
- ""
-
outputChannel
java.lang.String outputChannel- Returns:
- The channel name for sending aggregated result messages
- Default:
- ""
-
discardChannel
java.lang.String discardChannel- Returns:
- The channel name for sending discarded messages (due to a timeout)
- Default:
- ""
-
sendTimeout
java.lang.String sendTimeoutSpecify the maximum amount of time in milliseconds to wait when sending a replyMessageto theoutputChannel(). Defaults to-1- blocking indefinitely. It is applied only if the output channel has some 'sending' limitations, e.g.QueueChannelwith a fixed 'capacity' and is currently full. In this case aMessageDeliveryExceptionis thrown. The 'sendTimeout' is ignored in case ofAbstractSubscribableChannelimplementations. Can be specified as 'property placeholder', e.g.${spring.integration.sendTimeout}.- Returns:
- The timeout for sending results to the reply target (in milliseconds)
- Default:
- ""
-
sendPartialResultsOnExpiry
java.lang.String sendPartialResultsOnExpirySpecify whether messages that expired should be aggregated and sent to theoutputChannel()orreplyChannelfrom message headers. Messages are expired when their containingMessageGroupexpires. One of the ways of expiring MessageGroups is by configuring aMessageGroupStoreReaper. However MessageGroups can alternatively be expired by simply callingMessageGroupStore.expireMessageGroup(groupId). That could be accomplished via a ControlBus operation or by simply invoking that method if you have a reference to theMessageGroupStoreinstance. Defaults tofalse. * Can be specified as 'property placeholder', e.g.${spring.integration.sendPartialResultsOnExpiry}.- Returns:
- Indicates whether to send an incomplete aggregate on expiry of the message group
- Default:
- ""
-
autoStartup
java.lang.String autoStartupTheSmartLifecycleautoStartupoption. Can be specified as 'property placeholder', e.g.${foo.autoStartup}. Defaults totrue.- Returns:
- the auto startup
booleanflag.
- Default:
- ""
-
phase
java.lang.String phaseSpecify aSmartLifecyclephaseoption. DefaultsInteger.MAX_VALUE / 2forPollingConsumerandInteger.MIN_VALUEforEventDrivenConsumer. Can be specified as 'property placeholder', e.g.${foo.phase}.- Returns:
- the
SmartLifecyclephase.
- Default:
- ""
-
poller
Poller[] poller- Returns:
- the
Polleroptions for a polled endpoint (PollerMetadata). This attribute is anarrayjust to allow an empty default (no poller). Only onePollerelement is allowed.
- Default:
- {}
-