mirror of
https://github.com/symfony/recipes.git
synced 2026-09-18 10:36:43 +03:00
14 lines
918 B
Plaintext
14 lines
918 B
Plaintext
* You're ready to use the Messenger component. You can define your own message buses
|
|
or start using the default one right now by injecting the <info>message_bus</info> service
|
|
or type-hinting <info>Symfony\Component\Messenger\MessageBusInterface</info> in your code.
|
|
|
|
* To send messages to a transport and handle them asynchronously:
|
|
|
|
1. Update the <info>MESSENGER_TRANSPORT_DSN</> env var in <comment>.env</> if needed
|
|
and <info>framework.messenger.transports.async</> in <comment>config/packages/messenger.yaml</>;
|
|
2. (if using Doctrine) Generate a Doctrine migration <info>bin/console doctrine:migration:diff</>
|
|
and execute it <info>bin/console doctrine:migration:migrate</>
|
|
3. Route your message classes to the async transport in <comment>config/packages/messenger.yaml</>.
|
|
|
|
* <fg=blue>Read</> the documentation at <comment>https://symfony.com/doc/current/messenger.html</>
|