From b892a166bb1c0729810034a08f7f36e38e18197e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 14 Oct 2018 23:40:54 +0200 Subject: [PATCH 1/2] [Messenger] Register a handler for a specific bus --- messenger.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/messenger.rst b/messenger.rst index d3d5d5b9fd6..56868fece8b 100644 --- a/messenger.rst +++ b/messenger.rst @@ -449,6 +449,11 @@ this: This will generate the ``messenger.bus.commands`` and ``messenger.bus.events`` services that you can inject in your services. +.. note:: + + To register a handler for only a specific bus, add a tag called ``bus`` with the + name of this bus as value to the handler's service definition. + Type-hints and Auto-wiring ~~~~~~~~~~~~~~~~~~~~~~~~~~ From 6dd33117d4336a710c75b5010214bf136167e8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 14 Oct 2018 23:49:07 +0200 Subject: [PATCH 2/2] Update messenger.rst --- messenger.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/messenger.rst b/messenger.rst index 56868fece8b..450ea9df013 100644 --- a/messenger.rst +++ b/messenger.rst @@ -451,8 +451,9 @@ that you can inject in your services. .. note:: - To register a handler for only a specific bus, add a tag called ``bus`` with the - name of this bus as value to the handler's service definition. + To register a handler for only a specific bus, add a ``bus`` attribute having the + name of this bus as value to the ``messenger.message_handler`` tag in the handler's + service definition. Type-hints and Auto-wiring ~~~~~~~~~~~~~~~~~~~~~~~~~~