Skip to content
Snippets Groups Projects

fixed #6

Merged Piotr Maślanka requested to merge issue-#6 into milestone-2.0.0
Files
5
@@ -407,16 +407,17 @@ class Consumer(Channeler):
queue_declared = False
# We need any form of binding.
if self.queue.exchange is not None:
if self.queue.exchange.type != b'topic':
queue_declared = True
self.method_and_watch(
QueueBind(
self.queue.name,
self.queue.exchange.name.encode('utf8'),
b'', False, []),
QueueBindOk,
self.on_setup
)
queue_declared = True
qb = QueueBind(
self.queue.name,
self.queue.exchange.name.encode('utf-8'),
self.queue.routing_key, False, [])
logger.debug('Running %s' % (repr(qb)))
self.method_and_watch(
qb,
QueueBindOk,
self.on_setup
)
if not queue_declared:
# default exchange, pretend it was bind ok
Loading