From 955b39345e7d9c56700f41dfec7c8a7d660655be Mon Sep 17 00:00:00 2001 From: Clement Herreman Date: Fri, 15 Apr 2022 17:26:40 +0200 Subject: [PATCH] [Messenger] Add doc for default routing for messages --- messenger.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/messenger.rst b/messenger.rst index 605561e39d5..b5926c05d2a 100644 --- a/messenger.rst +++ b/messenger.rst @@ -261,7 +261,13 @@ you can configure them to be sent to a transport: Thanks to this, the ``App\Message\SmsNotification`` will be sent to the ``async`` transport and its handler(s) will *not* be called immediately. Any messages not -matched under ``routing`` will still be handled immediately. +matched under ``routing`` will still be handled immediately, i.e. synchronously. + +.. note:: + + You may use ``'*'`` as the message class. This will act as a default routing + rule for any message not matched under ``routing``. This is useful to ensure + no message is handled synchronously by default. You can also route classes by their parent class or interface. Or send messages to multiple transports: