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:
256256
257257 Thanks to this, the ``App\Message\SmsNotification `` will be sent to the ``async ``
258258transport 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).
260271
261272You can also route classes by their parent class or interface. Or send messages
262273to multiple transports:
You can’t perform that action at this time.
0 commit comments