Skip to content

DelayerEndpointSpec doesn't allow to specify custom taskScheduler #9825

Closed
@pziobron

Description

@pziobron

In what version(s) of Spring Integration are you seeing this issue?
6.2.11

Describe the bug
The custom taskScheduler is not configured for delay handler when using DelayerEndpointSpec#taskScheduler() method.
The default taskScheduler is used instead (IntegrationObjectSupport#getTaskScheduler() - taskScheduler is null)

To Reproduce

Use this code snippet:
subscribe(flow -> flow.delay(d -> d.messageGroupId("testDelayer").taskScheduler(myCustomTaskScheduler))).nullChannel();

when the delayer is executed the taskScheduler field is null and the default task scheduler is retrieved (IntegrationObjectSupport#getTaskScheduler())

I need to use this workaround to make it working properly:

DelayHandler handler = newDelayHandler("testDelayer", myCustomTaskScheduler);
subscribe(flow -> flow.handle(handler)).nullChannel();

Expected behavior

It should be possible to configure custom task scheduler using DelayerEndpointSpec#taskScheduler()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions