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