Menu

One Pool for Every Tenant: Messenger --concurrency on a Database-per-Tenant Symfony 8.2 Deployment
📰

One Pool for Every Tenant: Messenger --concurrency on a Database-per-Tenant Symfony 8.2 Deployment

DEV Community: php·Matt Mochalkin·6 days ago
#yGGtEPKB
#devto#dev#tenant#message#worker
Long article (3066 words) — no AI summary yet.
Reading 0:00
15s threshold

Parts one and two of this series put many tenant databases behind one Symfony deployment: each request and each queued message names its tenant, a DBAL connection wrapper follows it, and a shared worker handles messages of every tenant placed on the deployment. Then Symfony 8.2 shipped messenger:consume --concurrency , and the two shared workers of the demo became one worker with four children.

The first run retried every message. The handlers saw no tenant, because the listener that sets it runs in the parent process, and the handlers now run in children. That was the easy one.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.