Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions messenger/multiple_buses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ you can restrict each handler to a specific bus using the ``messenger.message_ha
This way, the ``App\MessageHandler\SomeCommandHandler`` handler will only be
known by the ``messenger.bus.commands`` bus.

.. tip::

If you manually restrict handlers be sure to have ``autoconfigure`` disabled,
or not implement the ``Symfony\Component\Messenger\Handler\MessageHandlerInterface``
as this might cause your handler to be registered twice.

See :ref:`autoconfigure <services-autoconfigure>` for more information.

You can also automatically add this tag to a number of classes by following
a naming convention and registering all of the handler services by name with
the correct tag:
Expand Down