Interface ReactorMessageDispatchInterceptor<M extends Message>

Type Parameters:
M - the type of Message this interceptor handles

public interface ReactorMessageDispatchInterceptor<M extends Message>
Reactor equivalent of MessageDispatchInterceptor.

Runs inside the Reactor subscription, giving access to Reactor's context (e.g., ReactiveSecurityContextHolder) which is not available in Axon Framework's native MessageDispatchInterceptor.

Implementations intercept a message before dispatch, potentially enriching it (e.g., adding metadata), and must call chain.proceed(message, context) to continue the chain.

Since:
4.4.2
Author:
Milan Savic, Theo Emanuelsson
  • Method Details

    • interceptOnDispatch

      reactor.core.publisher.Mono<?> interceptOnDispatch(M message, @Nullable ProcessingContext context, ReactorMessageDispatchInterceptorChain<M> chain)
      Intercepts a message before dispatch. Implementations may enrich the message (e.g., add metadata) and must call chain.proceed(message, context) to continue the chain.
      Parameters:
      message - the message being dispatched
      context - the active processing context, if any
      chain - the remaining interceptor chain
      Returns:
      a Mono that completes with the (possibly enriched) message