Sylius / InvoicingPlugin

Generate an Invoice for every placed order
MIT License
79 stars 83 forks source link

Shouldn't MessageHandlers be configured to only process messages from this plugin's message buses ? #157

Open acornforth opened 5 years ago

acornforth commented 5 years ago

I am developing a plugin for sylius, and, as with this plugin, I am using messenger.

When debugging my code with php bin/console debug:messenger I can see that this plugins message handlers are listening to all buses.

While this is not an urgent issue, and may not even produce any errors in most cases, surely, for maximum interoperability with other plugins/bundles, unless there is a specific reason why these handlers need to listen on other buses, they should probably be restricted to the buses defined in this bundle.

Mainly I'm asking in order to validate whether i need to do this in my own bundle...

acornforth commented 5 years ago

https://symfony.com/doc/current/messenger/multiple_buses.html#restrict-handlers-per-bus