SendStateEventFilter
Filter that sends state events to the state event bus after command processing. This filter runs after domain events are sent, ensuring that subscribers receive both the domain event and the updated aggregate state.
The filter creates a state event by combining the domain event stream with the current aggregate state, then publishes it to the configured state event bus.
Functions
Link copied to clipboard
open override fun filter(exchange: ServerCommandExchange<*>, next: FilterChain<ServerCommandExchange<*>>): Mono<Void>
Filters the command exchange by sending a state event if applicable. Creates and sends a state event containing both the domain event and aggregate state, then continues the filter chain.