[symfony/messenger] add reset_on_message in 5.4 (remove in 6.0) (#1080)

This commit is contained in:
Kevin Bond
2022-04-29 19:01:48 +02:00
committed by GitHub
parent f01c4a5ec7
commit f54b694258
6 changed files with 83 additions and 0 deletions
@@ -0,0 +1,17 @@
framework:
messenger:
# reset services after consuming messages
reset_on_message: true
# 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#transport-configuration
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
routing:
# Route your messages to the transports
# 'App\Message\YourMessage': async
+15
View File
@@ -0,0 +1,15 @@
{
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"env": {
"#1": "Choose one of the transports below",
"#2": "MESSENGER_TRANSPORT_DSN=doctrine://default",
"#3": "MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages",
"#4": "MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages"
},
"aliases": ["messenger"],
"conflict": {
"symfony/framework-bundle": "<4.3"
}
}
+11
View File
@@ -0,0 +1,11 @@
* 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. Uncomment the <info>MESSENGER_TRANSPORT_DSN</> env var in <comment>.env</>
and <info>framework.messenger.transports.async</> in <comment>config/packages/messenger.yaml</>;
2. 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</>
@@ -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#transport-configuration
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
routing:
# Route your messages to the transports
# 'App\Message\YourMessage': async
+15
View File
@@ -0,0 +1,15 @@
{
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"env": {
"#1": "Choose one of the transports below",
"#2": "MESSENGER_TRANSPORT_DSN=doctrine://default",
"#3": "MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages",
"#4": "MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages"
},
"aliases": ["messenger"],
"conflict": {
"symfony/framework-bundle": "<4.3"
}
}
+11
View File
@@ -0,0 +1,11 @@
* 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. Uncomment the <info>MESSENGER_TRANSPORT_DSN</> env var in <comment>.env</>
and <info>framework.messenger.transports.async</> in <comment>config/packages/messenger.yaml</>;
2. 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</>