I have noticed that for example, the consume command does not add Symfony\Component\Messenger\EventListener\AddErrorDetailsStampListener and I don't see errors in failed messages would be nice if we could configure them somehow.
|
if ($container->has(EventDispatcherInterface::class)) { |
|
$dispatcher = $container->get(EventDispatcherInterface::class); |
|
} else { |
|
$dispatcher = new EventDispatcher(); |
|
} |
|
|
|
// Attach Retry Listeners. Retries will only be triggered when the transport config specifies it |
|
$dispatcher->addSubscriber(new SendFailedMessageForRetryListener( |
|
$container, |
|
$container->get(RetryStrategyContainer::class), |
|
$logger, |
|
)); |
|
|
|
// Attach Failure Queue Listener. Messages will only be sent to the failure transport when one is configured |
|
$dispatcher->addSubscriber(new SendFailedMessageToFailureTransportListener( |
|
$container->get(FailureSendersProvider::class), |
|
$logger, |
|
)); |
for now, I can create a factory for
Symfony\Component\EventDispatcher\EventDispatcherInterface this should work, but maybe something more configurable would be better.
I have noticed that for example, the consume command does not add
Symfony\Component\Messenger\EventListener\AddErrorDetailsStampListenerand I don't see errors in failed messages would be nice if we could configure them somehow.laminas-messenger/src/Container/Command/ConsumeCommandFactory.php
Lines 31 to 48 in bd51b0c
for now, I can create a factory for
Symfony\Component\EventDispatcher\EventDispatcherInterfacethis should work, but maybe something more configurable would be better.