69 lines
2.9 KiB
YAML
69 lines
2.9 KiB
YAML
framework:
|
|
messenger:
|
|
failure_transport: failed
|
|
|
|
transports:
|
|
# https://symfony.com/doc/current/messenger.html#transport-configuration
|
|
async:
|
|
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
|
|
options:
|
|
use_notify: true
|
|
check_delayed_interval: 60000
|
|
retry_strategy:
|
|
max_retries: 3
|
|
multiplier: 2
|
|
# Bulk teamer mailings, kept off "async" so that a mailing of several hundred
|
|
# recipients cannot delay a password reset. Its own cron worker consumes this
|
|
# queue and nothing else; the two never see each other's messages, because the
|
|
# doctrine transport filters on the queue_name column. See docs/operations.md
|
|
# for both cron entries.
|
|
#
|
|
# The retry delays are spelled out because the default is one second: with a
|
|
# multiplier alone, all three retries of a mail are spent within seconds, so a
|
|
# short hiccup at the mail provider would drop a whole mailing into "failed" at
|
|
# once - the very thing sending one message per recipient is meant to avoid.
|
|
# A minute, three and nine outlive any realistic blip and span several runs of
|
|
# a worker that only lives for a few minutes at a time.
|
|
mailing:
|
|
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
|
|
options:
|
|
queue_name: mailing
|
|
use_notify: true
|
|
check_delayed_interval: 60000
|
|
retry_strategy:
|
|
max_retries: 3
|
|
delay: 60000
|
|
multiplier: 3
|
|
max_delay: 900000
|
|
failed: 'doctrine://default?queue_name=failed'
|
|
sync: 'sync://'
|
|
|
|
routing:
|
|
Symfony\Component\Mailer\Messenger\SendEmailMessage: async
|
|
Symfony\Component\Notifier\Message\ChatMessage: async
|
|
Symfony\Component\Notifier\Message\SmsMessage: async
|
|
|
|
# only the fan-out, the mails it produces carry an X-Bus-Transport header
|
|
App\Message\SendTeamerMailing: mailing
|
|
|
|
# Route your messages to the transports
|
|
# 'App\Message\YourMessage': async
|
|
|
|
when@dev:
|
|
framework:
|
|
messenger:
|
|
routing:
|
|
Symfony\Component\Mailer\Messenger\SendEmailMessage: sync
|
|
Symfony\Component\Notifier\Message\ChatMessage: sync
|
|
Symfony\Component\Notifier\Message\SmsMessage: sync
|
|
App\Message\SendTeamerMailing: sync
|
|
|
|
when@test:
|
|
framework:
|
|
messenger:
|
|
routing:
|
|
Symfony\Component\Mailer\Messenger\SendEmailMessage: sync
|
|
Symfony\Component\Notifier\Message\ChatMessage: sync
|
|
Symfony\Component\Notifier\Message\SmsMessage: sync
|
|
App\Message\SendTeamerMailing: sync
|