← Back to team overview

txamqp-user team mailing list archive

Multiple consumer queue in same channel

 

Hi

So I am trying to follow the examples bundled and I have been able to
perform most of the basic operations.

Now, I was trying to write an app which has two consumer queues. But I
am not sure how to write a loop to consume from two of them. I did
some Googling and the closest I could get was this thread:
http://www.mail-archive.com/txamqp-user@xxxxxxxxxxxxxxxxxxx/msg00045.html
but I am not sure if I understood the solution.

Basically, as the example suggests, we have a queue and fetch from it as:

        queue = yield conn.queue(self.tag)

        while True:
            msg = yield queue.get()
            doSomething(ms)


How can I get from two queue? Or in this case, I have to setup two channels?

-- 
Ritesh



Follow ups