@Async Deep Dive: Fixing Transaction Loss, MDC Context Loss, and Silent Exception Swallowing
This article explains why Spring's @Async annotation causes transaction rollback failures, MDC traceId loss in async threads, and silent exception swallowing, then provides production-ready solutions including separate service classes, TaskDecorator for MDC propagation, custom AsyncUncaughtExceptionHandler, and proper thread pool configuration.
