You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/reference/asciidoc/aggregator.adoc
+5-2
Original file line number
Diff line number
Diff line change
@@ -470,7 +470,8 @@ By default, an internal `DefaultLockRegistry` is used.
470
470
Use of a distributed `LockRegistry`, such as the `ZookeeperLockRegistry`, ensures only one instance of the aggregator can operate on a group concurrently.
471
471
See <<./redis.adoc#redis-lock-registry,Redis Lock Registry>>, <<./gemfire.adoc#gemfire-lock-registry,Gemfire Lock Registry>>, and <<./zookeeper.adoc#zk-lock-registry,Zookeeper Lock Registry>> for more information.
472
472
<21> A timeout (in milliseconds) to force the `MessageGroup` complete when the `ReleaseStrategy` does not release the group when the current message arrives.
473
-
This attribute provides a built-in time-based release strategy for the aggregator when there is a need to emit a partial result (or discard the group) if a new message does not arrive for the `MessageGroup` within the timeout.
473
+
This attribute provides a built-in time-based release strategy for the aggregator when there is a need to emit a partial result (or discard the group) if a new message does not arrive for the `MessageGroup` within the timeout which counts from the time the last message arrived.
474
+
To set up a timeout which counts from the time the `MessageGroup` was created see `group-timeout-expression` information.
474
475
When a new message arrives at the aggregator, any existing `ScheduledFuture<?>` for its `MessageGroup` is canceled.
475
476
If the `ReleaseStrategy` returns `false` (meaning do not release) and `groupTimeout > 0`, a new task is scheduled to expire the group.
476
477
We do not advise setting this attribute to zero (or a negative value).
@@ -485,7 +486,9 @@ Used for scheduling the `MessageGroup` to be forced complete.
485
486
If the expression evaluates to `null`, the completion is not scheduled.
486
487
If it evaluates to zero, the group is completed immediately on the current thread.
487
488
In effect, this provides a dynamic `group-timeout` property.
488
-
See `group-timeout` for more information.
489
+
As an example, if you wish to forcibly complete a `MessageGroup` after 10 seconds have elapsed since the time the group was created you might consider using the following SpEL expression: `timestamp + 10000 - T(System).currentTimeMillis()` where `timestamp` is provided by `MessageGroup.getTimestamp()` as the `MessageGroup` here is the `#root` evaluation context object.
490
+
Bear in mind however that the group creation time might differ from the time of the first arrived message depending on other group expiration properties' configuration.
491
+
See `group-timeout` for more information.
489
492
Mutually exclusive with 'group-timeout' attribute.
490
493
<23> When a group is completed due to a timeout (or by a `MessageGroupStoreReaper`), the group is expired (completely removed) by default.
0 commit comments