INT-2595: Add time-based ReleaseStrategy option#1100
Conversation
|
Let me know, if it's OK and I'll add some docs. |
|
Travis failed with |
|
OK; when we merge my PR, rebase and |
There was a problem hiding this comment.
We should probably assert that the delegate is not an RRR.
There was a problem hiding this comment.
RRR 😄 . Right, I was thinking to make it as package protected, but then I won't be able to configure it from DSL and I've protected us from this in JavaDocs.
|
This is really just a convenience for configuring the reaper - avoids a separate bean and scheduled task. If we stick with this technique, we should rename the attributes However, the alternative I was thinking of was to put logic in the Have a That way, we would only need |
There was a problem hiding this comment.
Just call this scheduler, like in delayer.
JIRA: https://jira.spring.io/browse/INT-2595 * Add `group-timeout` and `group-timeout-expression` to the Correlation Endpoint * Add logic to the `AbstractCorrelatingMessageHandler` to schedule group for `forceComplete`, when the target `ReleaseStrategy` returns `false`
|
Pushed. |
ReaperReleaseStrategyReleaseStrategy option
There was a problem hiding this comment.
We need to cancel the schedule regardless of whether we can release or not; we should do it as soon as possible after we get the lock, to minimize the possibility of interrupting the scheduled thread.
|
Cool! Or comments are good and reasonable. Will be applied |
There was a problem hiding this comment.
Wouldn't an overloaded method that takes a String be easier for DSL, and @Bean config?
There was a problem hiding this comment.
In DSL it will be populated from: https://github.com/spring-projects/spring-integration-extensions/blob/master/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/CorrelationHandlerSpec.java via methods groupTimeout(long value) and groupTimeoutExpression(String expression) and parsed internaly to the Expression.
|
Pushed |
|
LGTM; I will do some testing tomorrow. We need to explain the relationship between this and the reaper; maybe the reaper can be deprecated ? On the other hand, maybe some people will still require the expiration to happen on a schedule rather than a separate schedule for each group. We should also explain again in the docs that what happens when the group times out depends on I wonder if we should add some logic to also allow removal of empty groups - i.e. schedule another Or, they can continue to use the reaper for removing empty groups. |
|
Pushed. Don't see reason to deprecate |
|
LGTM; a little doc and test polish here... garyrussell@11b0cfd |
|
Thanks, Gary. I applied your polishing - continue to study english 😄. |
|
Your English is amazing! Just a little more polish here garyrussell@7fec667 and then I think I can merge. |
|
Polishing - LGTM. |
JIRA: https://jira.spring.io/browse/INT-2595
group-timeoutandgroup-timeout-expressionto the Correlation EndpointAbstractCorrelatingMessageHandlerto schedule group forforceComplete,when the target
ReleaseStrategyreturnsfalse