File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -431,6 +431,35 @@ transport and "sending" messages there to be handled immediately:
431
431
],
432
432
]);
433
433
434
+ Message Inheritance & Routing Configuration
435
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
436
+
437
+ With the following code and configuration, messages will be dispatched like this:
438
+ * `Notification ` to `async_1 `
439
+ * `SmsNotification ` to `async_1 `
440
+ * `SmsNotification ` to `async_2 `
441
+
442
+ .. code-block::php
443
+
444
+ <?php
445
+ namespace App\Message;
446
+ class SmsNotification extends Notification {}
447
+
448
+ .. code-block::yaml
449
+
450
+ # config/packages/messenger.yaml
451
+ framework:
452
+ messenger:
453
+ routing:
454
+ App\Message\Notification: async_1
455
+ App\Message\SmsNotification: async_2
456
+
457
+ .. code-block::php
458
+
459
+ <?php
460
+ $messageBus->dispatch(new Notification());
461
+ $messageBus->dispatch(new SmsNotification());
462
+
434
463
Creating your Own Transport
435
464
~~~~~~~~~~~~~~~~~~~~~~~~~~~
436
465
You can’t perform that action at this time.
0 commit comments