webflux-reactive-patterns
Installation
SKILL.md
WebFlux Reactive Patterns
Use WebFlux when the complete request path can benefit from non-blocking I/O.
Pipeline rules
- Return
MonoorFlux; do not callsubscribe()in request-handling code. - Compose work with
map,flatMap,concatMap, andzipaccording to ordering requirements. - Keep blocking JDBC, filesystem, and legacy SDK calls out of event-loop threads.
- Isolate unavoidable blocking calls on
boundedElasticat the narrow adapter boundary. - Apply timeouts at remote-call boundaries and preserve cancellation.
Context and errors
- Put request-scoped metadata in Reactor
Context, notThreadLocal. - Translate domain failures centrally without swallowing cancellation or infrastructure errors.
- Use
onErrorResumeonly when a defined fallback exists. - Avoid
onErrorContinue; it makes partial processing hard to reason about.