File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,18 @@ you can configure them to be sent to a transport:
266
266
267
267
Thanks to this, the ``App\Message\SmsNotification `` will be sent to the ``async ``
268
268
transport and its handler(s) will *not * be called immediately. Any messages not
269
- matched under ``routing `` will still be handled immediately.
269
+ matched under ``routing `` will still be handled immediately, i.e. synchronously.
270
+
271
+ .. note ::
272
+
273
+ You may use ``'*' `` as the message class. This will act as a default routing
274
+ rule for any message not matched under ``routing ``. This is useful to ensure
275
+ no message is handled synchronously by default.
276
+
277
+ The only drawback is that ``'*' `` will also apply to the emails sent with the
278
+ Symfony Mailer (which uses ``SendEmailMessage `` when Messenger is available).
279
+ This could cause issues if your emails are not serializable (e.g. if they include
280
+ file attachments as PHP resources/streams).
270
281
271
282
You can also route classes by their parent class or interface. Or send messages
272
283
to multiple transports:
You can’t perform that action at this time.
0 commit comments