async-event

Installation
SKILL.md

Async & event handling

Overview

This document defines rules for asynchronous processing and Spring event-driven communication. The project uses Virtual Thread executors with MDC propagation for @Async methods, and @TransactionalEventListener for transactional side effects.

Key Principle: Use @Async + @TransactionalEventListener(AFTER_COMMIT) for side effects after transaction commit. Never perform external I/O inside a transaction. Always preserve MDC context in async operations.

Async configuration

The project uses Virtual Thread-based async execution configured in AsyncConfig (common-web module).

Setting Value Description
Executor VirtualThreadTaskExecutor Lightweight virtual threads for async tasks
Thread prefix async-vt- Identifies async virtual threads in logs
Task decorator ContextPropagatingTaskDecorator Preserves MDC (traceId, requestId) across threads
Exception handler GlobalSimpleAsyncUncaughtExceptionHandler Logs KnownException at DEBUG level
Installs
1
First Seen
Apr 10, 2026