|
|
|
@ -410,7 +410,6 @@ class QueueReader(MessageQueue,Reader):
|
|
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
#self.close()
|
|
|
|
|
|
|
|
|
|
# r[qid].append( self.data)
|
|
|
|
|
|
|
|
|
|
return self.data
|
|
|
|
@ -419,10 +418,11 @@ class QueueListener(QueueReader):
|
|
|
|
|
properties = pika.ConnectionParameters(host=self.host)
|
|
|
|
|
self.connection = pika.BlockingConnection(properties)
|
|
|
|
|
self.channel = self.connection.channel()
|
|
|
|
|
self.channel.exchange_declare(exchange=self.uid,type='fanout')
|
|
|
|
|
self.channel.exchange_declare(exchange=self.uid,type='direct' )
|
|
|
|
|
|
|
|
|
|
self.info = self.channel.queue_declare(queue=qid,exclusive=True)
|
|
|
|
|
self.channel.queue_bind(exchange=self.uid,queue=self.info.method.queue)
|
|
|
|
|
self.info = self.channel.queue_declare(exclusive=True,queue=qid)
|
|
|
|
|
print self.info.method.queue
|
|
|
|
|
self.channel.queue_bind(exchange=self.uid,queue=self.info.method.queue,routing_key=qid)
|
|
|
|
|
#self.callback = callback
|
|
|
|
|
def read(self):
|
|
|
|
|
|
|
|
|
|