@@ -325,7 +325,7 @@ A class of messages can also be routed to multiple senders by specifying a list:
325
325
),
326
326
));
327
327
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
329
329
while still having them passed to their respective handler:
330
330
331
331
.. configuration-block ::
@@ -336,7 +336,9 @@ while still having them passed to their respective handler:
336
336
framework :
337
337
messenger :
338
338
routing :
339
- ' My\Message\ThatIsGoingToBeSentAndHandledLocally ' : [amqp, ~]
339
+ ' My\Message\ThatIsGoingToBeSentAndHandledLocally ' :
340
+ senders : [amqp]
341
+ send_and_handle : true
340
342
341
343
.. code-block :: xml
342
344
@@ -352,9 +354,8 @@ while still having them passed to their respective handler:
352
354
353
355
<framework : config >
354
356
<framework : messenger >
355
- <framework : routing message-class =" My\Message\ThatIsGoingToBeSentAndHandledLocally" >
357
+ <framework : routing message-class =" My\Message\ThatIsGoingToBeSentAndHandledLocally" send-and-handle = " true " >
356
358
<framework : sender service =" amqp" />
357
- <framework : sender service =" " />
358
359
</framework : routing >
359
360
</framework : messenger >
360
361
</framework : config >
@@ -366,7 +367,10 @@ while still having them passed to their respective handler:
366
367
$container->loadFromExtension('framework', array(
367
368
'messenger' => array(
368
369
'routing' => array(
369
- 'My\Message\ThatIsGoingToBeSentAndHandledLocally' => array('amqp', null),
370
+ 'My\Message\ThatIsGoingToBeSentAndHandledLocally' => array(
371
+ 'senders' => array('amqp'),
372
+ 'send_and_handle' => true,
373
+ ),
370
374
),
371
375
),
372
376
));
0 commit comments