[Messenger] Multiple doctrine transport with queues #63404
Replies: 2 comments
-
|
I would split the transports by operational concern, not just by message class. If the queues have different throughput, retry policy, failure handling, or database growth profile, separate Doctrine transports are easier to operate. You get clearer worker processes, clearer failure queues, and cleaner dashboards. For example: framework:
messenger:
transports:
emails: '%env(MESSENGER_EMAIL_DSN)%'
imports: '%env(MESSENGER_IMPORT_DSN)%'
billing: '%env(MESSENGER_BILLING_DSN)%'
routing:
App\Message\SendEmail: emails
App\Message\ImportJob: imports
App\Message\BillingJob: billingThe main thing I would avoid is one giant Doctrine transport where slow jobs, urgent jobs, and noisy retries all compete in the same table. Also give each transport its own failure transport if the recovery path differs. A failed email retry and a failed billing job usually should not be triaged the same way. |
Beta Was this translation helpful? Give feedback.
-
|
It looks like a bug since from the description of I also found #54821 which seems related. I guess a PR would be the fastest way to make things move. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there 👋
I am bit confused about queues & the messenger component as far as the doctrine transport is concerned.
I do use multiple transports with different queue names (as stated in the documentation), and the same DSN as you can see below.
The first issue I had is that, whatever transport I was using (via messenger:consume command) they were all picking into each others queues (eg: the async transport was picking into the email_async transport) so I figured that I had to be more "precise" and tell the consumer to consume a specific queue using the
--queuesoption but then a second issue came out. It seems that I can't because the doctrine transport/receiver do not implement theQueueReceiverInterface.Any idea where I did wrong ? Should I probably use separate DSNs ? Is this a hole in the racket ?
Beta Was this translation helpful? Give feedback.
All reactions