File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -900,6 +900,29 @@ serializer How to serialize the final payload ``Redis::SERIALIZER_PHP`
900
900
``Redis::OPT_SERIALIZER `` option)
901
901
================== =================================== =======
902
902
903
+ .. tip ::
904
+
905
+ At some point you'll likely want to scale the number of workers working on your queue.
906
+ Make sure you assign the correct ``consumer `` and ``group `` values in that case.
907
+ The more likely case is that each worker shall work on the queue independently, reducing
908
+ the time needed to process the pending messages. In that case, every single worker
909
+ must have a different ``consumer `` configuration value. When working with Docker
910
+ containers one idea might be to use the ``HOSTNAME `` environment variable:
911
+
912
+ .. configuration-block ::
913
+
914
+ .. code-block :: yaml
915
+
916
+ # config/packages/messenger.yaml
917
+ framework :
918
+ messenger :
919
+ transports :
920
+ redis : ' redis://localhost:6379/messages/symfony/%env(HOSTNAME)%'
921
+
922
+ The less likely case would be if you wanted to have every single worker to process every single message.
923
+ That means messages would be processed multiple times. In that case, you must have different ``group ``
924
+ configurations.
925
+
903
926
In Memory Transport
904
927
~~~~~~~~~~~~~~~~~~~
905
928
You can’t perform that action at this time.
0 commit comments