This is because when you use the AsMessageHandler attribute, Symfony creates a separate service for the handler, and this service has its own name. Therefore, when you run the debug:messenger command, you will see both the original service and the new service created by Symfony.
For example, if you have a service named "MyHandlerService" and you add the AsMessageHandler attribute to it, Symfony will create a new service named "messenger.handler.MyHandlerService". When you run the debug:messenger command, you will see both "MyHandlerService" and "messenger.handler.MyHandlerService".
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-07-05 12:08:49 +0000
Seen: 13 times
Last updated: Jul 05 '23