Slide 9
Slide 9 text
Detour: Quickly testing message handling
$transport = new InMemoryTransport();
$bus = new MessageBus([
new SendMessageMiddleware(
new SendersLocator([
EndOfTrialMessage::class => ['mem'],
],
new class(['mem' => fn () => $transport]) implements ContainerInterface {
use ServiceLocatorTrait;
},
,
),
new HandleMessageMiddleware(new HandlersLocator([
EndOfTrialMessage::class => [new EndOfTrialMessageHandler()],
])),
]);
A non-persistent
transport
Message/transport
wiring
Message/handler
wiring