From 9b91634ce26a495a061014e588386cd81684dea9 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Thu, 11 Oct 2018 18:30:52 +0200 Subject: [PATCH] [Messenger] Fix messenger.routing send_and_handle config --- messenger.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/messenger.rst b/messenger.rst index 40114dae794..d3d5d5b9fd6 100644 --- a/messenger.rst +++ b/messenger.rst @@ -325,7 +325,7 @@ A class of messages can also be routed to multiple senders by specifying a list: ), )); -By specifying a ``null`` sender, you can also route a class of messages to a sender +By specifying the ``send_and_handle`` option, you can also route a class of messages to a sender while still having them passed to their respective handler: .. configuration-block:: @@ -336,7 +336,9 @@ while still having them passed to their respective handler: framework: messenger: routing: - 'My\Message\ThatIsGoingToBeSentAndHandledLocally': [amqp, ~] + 'My\Message\ThatIsGoingToBeSentAndHandledLocally': + senders: [amqp] + send_and_handle: true .. code-block:: xml @@ -352,9 +354,8 @@ while still having them passed to their respective handler: - + - @@ -366,7 +367,10 @@ while still having them passed to their respective handler: $container->loadFromExtension('framework', array( 'messenger' => array( 'routing' => array( - 'My\Message\ThatIsGoingToBeSentAndHandledLocally' => array('amqp', null), + 'My\Message\ThatIsGoingToBeSentAndHandledLocally' => array( + 'senders' => array('amqp'), + 'send_and_handle' => true, + ), ), ), ));