Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[Messenger] Add a way to only call the handler assigned to a queue #30110
Here is the problem:
You can set up workers to each of the queues through the transport with “bin/console messenger:consume-messages [transport]”, that works great. The problem is that both workers call both handlers because the message class in both handlers is the same. What is needed is a way to specify the handlers for each worker.
It should be possible to implement this with a custom Envelope stamp and a custom https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Messenger/Handler/HandlersLocatorInterface.php so that it only calls the handler that fits with the stamp