Technical Senior Level

When would you use the Symfony Messenger component? Explain how message buses, handlers, and transports work together.

Quick Tip

Show practical use: "I dispatch a GenerateReport message to a Redis transport. A worker process picks it up, generates the PDF, and stores it. The user gets a notification when ready. Failed messages go to the failure transport for inspection."

What good answers include

Messenger dispatches message objects to handlers via a bus. Transports (Doctrine, Redis, AMQP, Amazon SQS) move messages between the bus and workers for async processing. Use cases: sending emails, processing uploads, generating reports, and any work that does not need to complete within the HTTP request. Strong candidates discuss: routing messages to specific transports, retry strategies and failure transports, serialisation, stamps for metadata, and the difference between command bus and event bus patterns.

What interviewers are looking for

Tests knowledge of async processing in Symfony. Candidates who do everything synchronously in controllers will build slow applications. Those who understand transports, retry strategies, and failure handling can build resilient async workflows.

← All Symfony questions