``.
+ # .env
+ MESSENGER_TRANSPORT_DSN=beanstalkd://localhost:11300?tube_name=foo&timeout=4&ttr=120
-The ``port`` setting is optional and defaults to ``11300`` if not set.
+ # If no port, it will default to 11300
+ MESSENGER_TRANSPORT_DSN=beanstalkd://localhost
The transport has a number of options:
-.. configuration-block::
-
- .. code-block:: yaml
-
- # config/packages/messenger.yaml
- framework:
- messenger:
- transports:
- async_priority_high: "%env(MESSENGER_TRANSPORT_DSN)%?tube_name=high_priority"
- async_normal:
- dsn: "%env(MESSENGER_TRANSPORT_DSN)%"
- options:
- tube_name: normal_priority
-
- .. code-block:: xml
-
-
-
-
-
-
-
-
-
-
-
- normal_priority
-
-
-
-
-
-
-
- .. code-block:: php
-
- // config/packages/messenger.php
- $container->loadFromExtension('framework', [
- 'messenger' => [
- 'transports' => [
- 'async_priority_high' => '%env(MESSENGER_TRANSPORT_DSN)%?tube_name=high_priority',
- 'async_priority_low' => [
- 'dsn' => '%env(MESSENGER_TRANSPORT_DSN)%',
- 'options' => [
- 'tube_name' => 'normal_priority'
- ]
- ],
- ],
- ],
- ]);
-
-Options defined under ``options`` take precedence over ones defined in the DSN.
-
================== =================================== ======================
Option Description Default
================== =================================== ======================
@@ -1119,6 +1124,9 @@ ttr The message time to run before it
Redis Transport
~~~~~~~~~~~~~~~
+The Redis transport uses `streams`_ to queue messages. This transport requires
+the Redis PHP extension (>=4.3) and a running Redis server (^5.0).
+
.. versionadded:: 5.1
Starting from Symfony 5.1, the Redis transport has moved to a separate package.
@@ -1128,9 +1136,9 @@ Redis Transport
$ composer require symfony/redis-messenger
-The Redis transport uses `streams`_ to queue messages.
+The Redis transport DSN may looks like this:
-.. code-block:: bash
+.. code-block:: env
# .env
MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
@@ -1143,11 +1151,7 @@ The Redis transport uses `streams`_ to queue messages.
The Unix socket DSN was introduced in Symfony 5.1.
-To use the Redis transport, you will need the Redis PHP extension (>=4.3) and
-a running Redis server (^5.0).
-
-A number of options can be configured via the DSN or via the ``options`` key
-under the transport in ``messenger.yaml``:
+The transport has a number of options:
=================== ===================================== =========================
Option Description Default
@@ -1275,27 +1279,27 @@ Amazon SQS
The Amazon SQS transport as introduced in Symfony 5.1.
-Install Amazon SQS transport by running:
+The Amazon SQS transport is perfect for application hosted on AWS. Install it by
+running:
.. code-block:: terminal
$ composer require symfony/amazon-sqs-messenger
-The ``SQS`` transport configuration looks like this:
+The SQS transport DSN may looks like this:
.. code-block:: env
# .env
MESSENGER_TRANSPORT_DSN=sqs://AKIAIOSFODNN7EXAMPLE:j17M97ffSVoKI0briFoo9a@sqs.eu-west-3.amazonaws.com/messages
- #MESSENGER_TRANSPORT_DSN=sqs://localhost:9494/messages?sslmode=disable
+ MESSENGER_TRANSPORT_DSN=sqs://localhost:9494/messages?sslmode=disable
.. note::
The transport will automatically create queues that are needed. This
can be disabled setting the ``auto_setup`` option to ``false``.
-A number of options can be configured via the DSN or via the ``options`` key
-under the transport in ``messenger.yaml``:
+The transport has a number of options:
====================== ====================================== ===================================
Option Description Default
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy