Skip to content

Commit 3c0c602

Browse files
Denis Brumannjaviereguiluz
authored andcommitted
[Messenger] Adds tip for handler misconfiguration
1 parent bdece76 commit 3c0c602

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

messenger/multiple_buses.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ you can restrict each handler to a specific bus using the ``messenger.message_ha
191191
This way, the ``App\MessageHandler\SomeCommandHandler`` handler will only be
192192
known by the ``messenger.bus.commands`` bus.
193193

194+
.. tip::
195+
196+
If you manually restrict handlers be sure to have ``autoconfigure`` disabled,
197+
or not implement the ``Symfony\Component\Messenger\Handler\MessageHandlerInterface``
198+
as this might cause your handler to be registered twice.
199+
200+
See :ref:`autoconfigure <services-autoconfigure>` for more information.
201+
194202
You can also automatically add this tag to a number of classes by following
195203
a naming convention and registering all of the handler services by name with
196204
the correct tag:

0 commit comments

Comments
 (0)