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