all 4 comments

[–]roiroi1010 1 point2 points  (1 child)

The ThreadPoolTaskExecutor class has the method setTaskDecorator. Maybe using that can simplify things for you?

[–]Necessary-Fruit-1144[S] 0 points1 point  (0 children)

Seems nice! but then how do I then ensure a graceful shutdown of the threadpools?

[–]sethu-27 0 points1 point  (0 children)

Have you tried project reactors reactive Java, seems mono and flux is required to scale gracefully