Skip to content
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

Merged
merged 2 commits into from Jun 12, 2023
Merged

Conversation

artembilan
Copy link
Member

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

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");
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The {@link #messageGroupId} must be provided then via setter.
* The {@link #messageGroupId} must then be provided via the setter.

Comment on lines 564 to 567
@Deprecated("since 6.2",
ReplaceWith("""delay {
messageGroupId(groupId)
}"""))
Copy link
Contributor

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
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation.

@garyrussell garyrussell merged commit 81af20a into spring-projects:main Jun 12, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants