Documentation

DispatchAfterCurrentBusMiddleware
in package
implements MiddlewareInterface

Allow to configure messages to be handled after the current bus is finished.

I.e, messages dispatched from a handler with a DispatchAfterCurrentBus stamp will actually be handled once the current message being dispatched is fully handled.

For instance, using this middleware before the DoctrineTransactionMiddleware means sub-dispatched messages with a DispatchAfterCurrentBus stamp would be handled after the Doctrine transaction has been committed.

Tags
author

Tobias Nyholm tobias.nyholm@gmail.com

Table of Contents

Interfaces

MiddlewareInterface

Properties

$isRootDispatchCallRunning  : bool
$queue  : array<string|int, QueuedEnvelope>

Methods

handle()  : Envelope

Properties

$isRootDispatchCallRunning

private bool $isRootDispatchCallRunning = false

this property is used to signal if we are inside a the first/root call to MessageBusInterface::dispatch() or if dispatch has been called inside a message handler

Methods


        
On this page

Search results