Description
I need my integration flows to see parent thread context (threadlocals, requestcontext, securitycontext etc..) so I use the setDecoratorTask on the custom TaskExecutor. This works well when IntegrationFlow is built from a Jms.messageDrivenChannelAdapter for instance.
But I also have an IntegrationFlow.fromSupplier(supplier, spec -> spec.taskExecutor(custom)), and in this case, it looks like a TaskScheduler executor is built-in by default to wrap my custom TaskExecutor in PollerMetadata so it opens an intermediate thread that makes my TaskDecorator not being able to see the main thread context and therefore propagate it to spawned tasks.
TaskScheduler does not seem to be configurable and I can't find an option to pass a TaskDecorator to it's "sheduling-" name prefixed threads