Improve Delayer DSL (#8645)
* Improve Delayer DSL 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 * * Fix language and code style
This commit is contained in:
@@ -801,7 +801,8 @@ public class IntegrationFlowTests {
|
||||
return IntegrationFlow.from("bridgeFlow2Input")
|
||||
.bridge(c -> c.autoStartup(false).id("bridge"))
|
||||
.fixedSubscriberChannel()
|
||||
.delay("delayer", d -> d
|
||||
.delay(d -> d
|
||||
.messageGroupId("delayer")
|
||||
.delayExpression("200")
|
||||
.advice(this.delayedAdvice)
|
||||
.messageStore(this.messageStore()))
|
||||
|
||||
@@ -320,7 +320,10 @@ class KotlinDslTests {
|
||||
wireTap {
|
||||
channel { queue("wireTapChannel") }
|
||||
}
|
||||
delay("delayGroup") { defaultDelay(100) }
|
||||
delay {
|
||||
messageGroupId("delayGroup")
|
||||
defaultDelay(100)
|
||||
}
|
||||
transform<String> { it.uppercase() }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user