Update messenger

This commit is contained in:
Maxime Helias
2019-05-23 14:19:13 +02:00
parent 3b19bd9488
commit cc7252ac8f
3 changed files with 43 additions and 0 deletions
@@ -0,0 +1,14 @@
framework:
messenger:
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
# failure_transport: failed
transports:
# https://symfony.com/doc/current/messenger.html#transports
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
routing:
# Route your messages to the transports
# 'App\Message\YourMessage': [async, sync]
+14
View File
@@ -0,0 +1,14 @@
{
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"env": {
"#1": "To use AMQP, also run composer require amqp",
"#2": "MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages",
"#3": "MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages"
},
"aliases": ["messenger"],
"conflict": {
"symfony/framework-bundle": "<4.3"
}
}
+15
View File
@@ -0,0 +1,15 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> What's next? </>
<bg=blue;fg=white> </>
* 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>messenger.bus.default</info> service
or typehinting <info>Symfony\Component\Messenger\MessageBusInterface</info> in your code.
* To send messages to a transport and handle them asynchronously:
1. Uncomment the <comment>MESSENGER_TRANSPORT_DSN</> env var in .env
and <comment>framework.messenger.transports.async</> in config/packages/messenger.yaml;
2. Route your message classes to the async transport in config/packages/messenger.yaml.
* <fg=blue>Read</> the documentation at <comment>https://symfony.com/doc/master/messenger.html</>