Skip to content
Snippets Groups Projects
Commit 355ff1d550cb authored by Luke Bakken's avatar Luke Bakken
Browse files

Fix twisted service example

Without binding queues to the exchange, no messages will be routed
parent 2bbcda527296
No related branches found
No related tags found
No related merge requests found
...@@ -92,7 +92,8 @@ ...@@ -92,7 +92,8 @@
if not exchange == '': if not exchange == '':
yield self.channel.exchange_declare(exchange=exchange, exchange_type='topic', durable=True, auto_delete=False) yield self.channel.exchange_declare(exchange=exchange, exchange_type='topic', durable=True, auto_delete=False)
self.channel.queue_declare(queue=routing_key, durable=True) yield self.channel.queue_declare(queue=routing_key, durable=True)
yield self.channel.queue_bind(queue=routing_key, exchange=exchange, routing_key=routing_key)
(queue, consumer_tag,) = yield self.channel.basic_consume(queue=routing_key, no_ack=False) (queue, consumer_tag,) = yield self.channel.basic_consume(queue=routing_key, no_ack=False)
d = queue.get() d = queue.get()
......
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
mock mock
nose nose
tornado tornado
twisted<15.4.0 twisted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment