java-spring-cloud icon indicating copy to clipboard operation
java-spring-cloud copied to clipboard

Library silently enables Async

Open judomu opened this issue 7 years ago • 2 comments

The configuration class DefaultAsyncAutoConfiguration enables @Async by using @EnableAsync. Is this a good pattern? I didn't expected that the library for instrumenting code is activating this functionality (per default). I would expect that the library set's up a proper configuration but doesn't enable it.

I have stumpled over this issue because we deactivated @Async for one environment and the application failed because reference threadpools have not been set-up. Took me some while to figer out what's going wrong.

judomu avatar Dec 10 '18 17:12 judomu

Is async enabled even if opentracing.spring.cloud.async.enabled is set to false? This property is defined on DefaultAsyncAutoConfiguration. The other question is if we can enable async programmatically.

pavolloffay avatar Dec 10 '18 20:12 pavolloffay

This issue is still valid and yes setting opentracing.spring.cloud.async.enabled to false keeps a non-Async application that way.

ledor473 avatar Jun 15 '20 15:06 ledor473