我想使用 messenger 组件和 rabbitmq 提交一个带有异步方法的表单。提交此表格后,会向我发送一封电子邮件。但是当我实现rabbitmq时它不起作用。我肯定有配置问题。也许我必须在 services.yml 中添加一些东西?我不想使用码头工人。
transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
async :
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
auto_setup: false
use_notify: true
check_delayed_interval: 60000
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
routing:
# Route your messages to the transports
'App\Message\MailNotification': async
.env 文件与 amqp 因为我想使用 rabbitmq
MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
当我提交表单时输出给我这个结果
Could not connect to the AMQP server. Please verify the provided DSN. ({"host":"localhost","port":5672,"vhost":"/","auto_setup":false,"use_notify":true,"check_delayed_interval":60000,"login":"guest","password":"********"}).
另外,Rabbitmq UI 出现在 webprofiler DOWN 上,没有转为 UP。我想不通。请帮帮我。