New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Delayer DSL #8645
Improve Delayer DSL #8645
Conversation
Move `groupId` option from a `delay()` method arg to the `DelayerEndpointSpec` to make it cleaner from code reading perspective * Expose new DSL method based on just a `DelayerEndpointSpec` for Kotlin &v Groovy * Deprecate multi-arg `delay()` methods in favor of `Consumer<DelayerEndpointSpec>`-based
@@ -297,6 +318,8 @@ public IntegrationPatternType getIntegrationPatternType() { | |||
|
|||
@Override | |||
protected void doInit() { | |||
Assert.notNull(this.messageGroupId, "The 'messageGroupId' must be provided"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either "A 'messageGroupId'..." or "The 'messageGroupId' property..."
@@ -126,6 +130,14 @@ public class DelayHandler extends AbstractReplyProducingMessageHandler implement | |||
|
|||
private long retryDelay = DEFAULT_RETRY_DELAY; | |||
|
|||
/** | |||
* Construct an instance with default options. | |||
* The {@link #messageGroupId} must be provided then via setter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* The {@link #messageGroupId} must be provided then via setter. | |
* The {@link #messageGroupId} must then be provided via the setter. |
@Deprecated("since 6.2", | ||
ReplaceWith("""delay { | ||
messageGroupId(groupId) | ||
}""")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange indentation.
delay { | ||
messageGroupId 'delayGroup' | ||
defaultDelay 100 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix indentation.
Move
groupId
option from adelay()
method arg to theDelayerEndpointSpec
to make it cleaner from code reading perspectiveDelayerEndpointSpec
for Kotlin &v Groovydelay()
methods in favor ofConsumer<DelayerEndpointSpec>
-based