rabbitmqctl 命令添加队列和exchange

#添加exchange
rabbitmqctl eval 'rabbit_exchange:declare({resource, <<"/">>, exchange, <<"exchange_pent">>}, topic, true, false, false, []).'

#添加队列
rabbitmqctl eval 'rabbit_amqqueue:declare({resource, <<"/">>, queue, <<"pre.queue">>}, true, false, [], none).'
#绑定队列
rabbitmqctl eval 'rabbit_binding:add({binding, {resource, <<"test">>, exchange, <<"ac.exchange.alarm">>}, <<"ac.routing.key.alarm">>, {resource, <<"test">>, queue, <<"ac.queue.alarm">>}, []}).'
rabbitmqctl eval 'rabbit_binding:add({binding, {resource, <<"/">>, exchange, <<"exchange_pent">>}, <<"#">>, {resource, <<"/">>, queue, <<"pre.queue">>}, []}).'

参考:https://blog.csdn.net/hncscwc/article/details/79048647

上一篇:深入了解RabbitMQ工作原理及简单使用


下一篇:rabbitmq安装