@@ -325,7 +325,7 @@ A class of messages can also be routed to multiple senders by specifying a list:
325325 ),
326326 ));
327327
328- By specifying a ``null `` sender , you can also route a class of messages to a sender
328+ By specifying the ``send_and_handle `` option , you can also route a class of messages to a sender
329329while still having them passed to their respective handler:
330330
331331.. configuration-block ::
@@ -336,7 +336,9 @@ while still having them passed to their respective handler:
336336 framework :
337337 messenger :
338338 routing :
339- ' My\Message\ThatIsGoingToBeSentAndHandledLocally ' : [amqp, ~]
339+ ' My\Message\ThatIsGoingToBeSentAndHandledLocally ' :
340+ senders : [amqp]
341+ send_and_handle : true
340342
341343 .. code-block :: xml
342344
@@ -352,9 +354,8 @@ while still having them passed to their respective handler:
352354
353355 <framework : config >
354356 <framework : messenger >
355- <framework : routing message-class =" My\Message\ThatIsGoingToBeSentAndHandledLocally" >
357+ <framework : routing message-class =" My\Message\ThatIsGoingToBeSentAndHandledLocally" send-and-handle = " true " >
356358 <framework : sender service =" amqp" />
357- <framework : sender service =" " />
358359 </framework : routing >
359360 </framework : messenger >
360361 </framework : config >
@@ -366,7 +367,10 @@ while still having them passed to their respective handler:
366367 $container->loadFromExtension('framework', array(
367368 'messenger' => array(
368369 'routing' => array(
369- 'My\Message\ThatIsGoingToBeSentAndHandledLocally' => array('amqp', null),
370+ 'My\Message\ThatIsGoingToBeSentAndHandledLocally' => array(
371+ 'senders' => array('amqp'),
372+ 'send_and_handle' => true,
373+ ),
370374 ),
371375 ),
372376 ));
0 commit comments