Skip to content

Vert.x Coupling ​

Vert.x is not a pure Quarkus concern and must be treated separately from CDI/Mutiny lock-in.

AreaCurrent behaviorWhy it matters for Spring
Request/runtime contextPipelineContextHolder, PipelineCacheStatusHolder, TransportDispatchMetadataHolder, and AwaitExecutionContextHolder use Vert.x localsSpring WebFlux uses Reactor context; context must move through Reactor signals
Persistence context safetyPersistenceService uses Vert.x context types for Hibernate Reactive safetySpring R2DBC should not inherit this path
Event-loop safetyGenerated/offload guidance relies on Vert.x patterns and @RunOnVirtualThreadSpring needs Reactor/event-loop compatible offload policy
Renderer outputREST/gRPC renderers emit io.smallrye.common.annotation.RunOnVirtualThread in casesSpring renderer needs scheduler or virtual-thread policy
Tests/examplesSome tests use quarkus-test-vertx and Vert.x-specific loggingSpring path needs dedicated async/reactive validation

Keep Vert.x coupling in a clear seam:

  • Quarkus path: Vert.x local context + thread locals
  • Spring path: Reactor ContextView + thread locals where safe

The portability interface should be explicit, e.g. ExecutionContextCarrier, to carry pipeline context, cache status, transport metadata, and await context across async boundaries.