我有 2 个发布队列和 2 个订阅队列,我可以在连接中处理四个队列吗?
connection = amqp.createConnection();
connection.on("ready", function () {
subscribe(queue1,msg1);
publishto(queue2,msg1);
subscribe(queue3,msg2);
publishto(queue4,msg2);
}
还是四个连接?
subscribe1(){
connection = amqp.createConnection();
connection.on("ready", function () {
subscribeto(queue1,msg1);
})
subscribe2(){
connection = amqp.createConnection();
connection.on("ready", function () {
subscribeto(queue1,msg1);
})
......