Kombu fanout error

Kombu fanout error

Postby weiz » Wed Oct 09, 2013 2:57 pm

hi , i am trying to run Kombu consumer with exchange(type='fanout') .. but it got error

Code: Select all
amqp.exceptions.ChannelError: 406: (PRECONDITION_FAILED - cannot redeclare exchange 'buster' in vhost '/' with different type, durable, internal or autodelete value, (40, 10), None)

here's my consumer.py code
Code: Select all
from kombu import Connection
from kombu.messaging import Exchange, Queue, Consumer

connection = Connection('amqp://guest:guest@localhost:5672//')

# RabbitMQ connection                                                                                                                                                                                                                         
channel = connection.channel()

default_exchange = Exchange("buster", type='fanout')

default_queue = Queue("kombu_demo", exchange=default_exchange)

def process_msg(body, msg):
    print "body %s, msg %s" % (repr(body), repr(msg))

consumer = Consumer(channel, default_queue, callbacks=[process_msg])
    while True:
except KeyboardInterrupt:

i already search to solve the problem but still no hope . i like know to what i'm missing on the consumer code . thank's
Posts: 1
Joined: Wed Oct 09, 2013 2:33 pm

Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest