Multiple consumer in rabbitmq for multiple queue
问题 I have 2 queues, say q1 and q2, which corresponds to e1 and e2 exchanges with binding key b1 and b2. I want to run consumer functions in parallel, say c1 and c2 which will listen to q1 and q2 respectively. I tried the following way: def c1(): connection = pika.BlockingConnection(pika.ConnectionParameters(host=constants.rmqHostIp)) channel = connection.channel() channel.exchange_declare(exchange='e1', durable='true', type='topic') result = channel.queue_declare(durable='false', queue='q1')