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