We're using Symfony Messenger, and have these transports:
framework:
messenger:
failure_transport: failed
transports:
failed:
dsn: 'doctrine://default?queue_name=failed'
options:
table_name: 'MessengerMessages'
async:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
retry_strategy:
max_retries: 3
delay: 5000
multiplier: 2
max_delay: 0
asyncLowPriority:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%_low_priority'
retry_strategy:
max_retries: 5
delay: 3600000
multiplier: 2
max_delay: 0
sync: 'sync://'
When we send a message to the async queue, and the last retry fails with an exception, the exception is logged to the MessengerMessages table, and the exception bubbles up (goes to Sentry in our case). This is what we want.
When we send a message to the asyncLowPriority queue however, we would like failed messages to:
- not got to the
failedtransport - not make the exception bubble up
Basically, the exception should be dropped.
Is this possible, and how?
The reason is that we're using this queue for downloading images asynchronously, and we already log each failure in a dedicated database table in the command handler.