我正在使用symfony 4.3
,但在enqueue/enqueue-bundle
和enqueue/amqp-ext
的实现上遇到了问题。
我一直使用php-amqplib
/ rabbitmq-bundle
,我使用配置文件来创建队列,交换和绑定...
old_sound_rabbit_mq:
connections:
default:
host: "%rabbitmq_default_host%"
port: "%rabbitmq_default_port%"
user: "%rabbitmq_default_user%"
password: "%rabbitmq_default_password%"
vhost: "%rabbitmq_default_vhost%"
lazy: "%rabbitmq_default_lazy%"
connection_timeout: "%rabbitmq_default_connection_timeout%"
read_write_timeout: "%rabbitmq_default_read_write_timeout%"
keepalive: "%rabbitmq_default_keepalive%"
heartbeat: "%rabbitmq_default_heartbeat%"
producers:
sync_data:
connection: default
exchange_options: {name: "my_exchange", type: topic}
consumers:
sync_data:
connection: default
exchange_options: {name: "my_exchange", type: topic}
queue_options: {name: "my_queue", routing_keys: {'my.binding.#'}}
当我使用old_sound_rabbit_mq
启动使用者时,它将自动创建具有my_exchange
类型的交易所topic
,并且还将创建具有绑定键{{1 }}
我想用my_queue
做同样的事情,我可以这样做吗?