Open
Description
Description
It seems that we cannot configure symfony/messenger to prevent auto setup for delay exchange.
When an application is just a publisher but doesn't consume any queue, there is no need to auto setup a delay exchange.
I'm actually working on a PR about this.
Example
Proposal:
Add the option auto_setup
for delay, default true.
framework:
messenger:
transports:
async_transport:
[...]
# https://symfony.com/doc/current/messenger.html#amqp-transport
options:
delay:
auto_setup: false
queues: []
[...]
With this option, the delay exchange will not be declared there:
Also, add a condition in Connection->setup to call setupDelayExchange only if delay exchange is not disabled (transport retry_strategy.max_retries equals 0 ? Not sure because delay may be use in other use cases than retry)