Azure Queue transport for Symfony's Messenger component.
The messenger-azure-queue-transport component requires PHP 7.3+ and Symfony 4.3+.
You can install this component using Symfony Flex:
composer require alexandrubau/messenger-azure-queue-transport
Set environment variable:
MESSENGER_TRANSPORT_DSN=azurequeue://<account_name>:<account_key>@default
In case your Account Name or Account Key contain special characters, you can use PHP's rawurlencode()
function to encode them.
Set messenger transport config:
framework:
messenger:
transports:
azure_queues:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
queue_name: <your_queue_name>
visibility_timeout: <visibility_timeout_in_seconds>
time_to_live: <time_to_live_in_seconds>
results_limit: <how_many_messages_to_read>
Options can be configured via the DSN or via the options key under the transport in messenger.yaml
. Example:
MESSENGER_TRANSPORT_DSN=azurequeue://<account_name>:<account_key>@default?queue_name=<your_queue_name>&visibility_timeout=<visibility_timeout_in_seconds>&time_to_live=<time_to_live_in_seconds>&results_limit=<how_many_messages_to_read>
Don't forget to create the queue with the supplied name in Azure Queue Storage.