@@ -992,6 +992,102 @@ auto_setup Whether the table should be created
992992 automatically during send / get. true
993993================== =================================== ======================
994994
995+ Beanstalkd Transport
996+ ~~~~~~~~~~~~~~~~~~~~
997+
998+ .. versionadded :: 5.2
999+
1000+ Install it by running:
1001+
1002+ .. code-block :: terminal
1003+
1004+ $ composer require symfony/beanstalkd-messenger
1005+
1006+ .. code-block :: bash
1007+
1008+ # .env
1009+ MESSENGER_TRANSPORT_DSN=beanstalkd://localhost
1010+
1011+ The format is ``beanstalkd://<ip>:<port>?tube_name=<name>&timeout=<timeoutInSeconds>&ttr=<ttrInSeconds> ``.
1012+
1013+ The ``port `` setting is optional and defaults to ``11300 `` if not set.
1014+
1015+ The transport has a number of options:
1016+
1017+ .. configuration-block ::
1018+
1019+ .. code-block :: yaml
1020+
1021+ # config/packages/messenger.yaml
1022+ framework :
1023+ messenger :
1024+ transports :
1025+ async_priority_high : " %env(MESSENGER_TRANSPORT_DSN)%?tube_name=high_priority"
1026+ async_normal :
1027+ dsn : " %env(MESSENGER_TRANSPORT_DSN)%"
1028+ options :
1029+ tube_name : normal_priority
1030+
1031+ .. code-block :: xml
1032+
1033+ <!-- config/packages/messenger.xml -->
1034+ <?xml version =" 1.0" encoding =" UTF-8" ?>
1035+ <container xmlns =" http://symfony.com/schema/dic/services"
1036+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1037+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
1038+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
1039+ https://symfony.com/schema/dic/services/services-1.0.xsd
1040+ http://symfony.com/schema/dic/symfony
1041+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
1042+
1043+ <framework : config >
1044+ <framework : messenger >
1045+ <framework : transport name =" async_priority_high" dsn =" %env(MESSENGER_TRANSPORT_DSN)%?tube_name=high_priority" />
1046+ <framework : transport name =" async_priority_low" dsn =" %env(MESSENGER_TRANSPORT_DSN)%" >
1047+ <framework : options >
1048+ <framework : tube >
1049+ <framework : name >normal_priority</framework : name >
1050+ </framework : tube >
1051+ </framework : options >
1052+ </framework : transport >
1053+ </framework : messenger >
1054+ </framework : config >
1055+ </container >
1056+
1057+ .. code-block :: php
1058+
1059+ // config/packages/messenger.php
1060+ $container->loadFromExtension('framework', [
1061+ 'messenger' => [
1062+ 'transports' => [
1063+ 'async_priority_high' => '%env(MESSENGER_TRANSPORT_DSN)%?tube_name=high_priority',
1064+ 'async_priority_low' => [
1065+ 'dsn' => '%env(MESSENGER_TRANSPORT_DSN)%',
1066+ 'options' => [
1067+ 'tube_name' => 'normal_priority'
1068+ ]
1069+ ],
1070+ ],
1071+ ],
1072+ ]);
1073+
1074+ Options defined under ``options `` take precedence over ones defined in the DSN.
1075+
1076+ ================== =================================== ======================
1077+ Option Description Default
1078+ ================== =================================== ======================
1079+ tube_name Name of the queue default
1080+ timeout Message reservation timeout 0 (will cause the
1081+ - in seconds. server to immediately
1082+ return either a
1083+ response or a
1084+ TransportException
1085+ will be thrown)
1086+ ttr The message time to run before it
1087+ is put back in the ready queue
1088+ - in seconds. 90
1089+ ================== =================================== ======================
1090+
9951091Redis Transport
9961092~~~~~~~~~~~~~~~
9971093
0 commit comments