feat: send mailings over MailJet smtp in dedicated worker process
This commit is contained in:
@@ -12,6 +12,29 @@ framework:
|
||||
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://'
|
||||
|
||||
@@ -20,6 +43,9 @@ framework:
|
||||
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
|
||||
|
||||
@@ -30,3 +56,13 @@ when@dev:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user