symfony-messenger

Symfony messenger and mailer : how to add a binding_key?

╄→尐↘猪︶ㄣ 提交于 2021-02-10 20:21:54
问题 I have a running Symfony 4.4 project with messenger and rabbitMQ. I have an async transport with 2 queues. transports: # https://symfony.com/doc/current/messenger.html#transport-configuration async: dsn: '%env(MESSENGER_TRANSPORT_DSN)%' options: exchange: name: myexchange type: direct queues: email: binding_keys: - email extranet: binding_keys: - extranet # failed: 'doctrine://default?queue_name=failed' # sync: 'sync://' routing: # Route your messages to the transports 'App\Message

How to run bin/console messenger:consume command out of Symfony project?

杀马特。学长 韩版系。学妹 提交于 2021-01-29 07:13:44
问题 I use Messenger Component in a non-Symfony project and Doctrine as a DSN transport. Now I want to test my code and consume the messages on my local machine, but I don't know how to run the messenger command in the console. I tried to use Symfony\Component\Console\Application and register the \Symfony\Component\Messenger\Command\ConsumeMessagesCommand command in the console but there are many nested dependencies. Do you have any idea? 回答1: We actually do this in many projects, even WordPress