To use, replace:
from carrot.connection import BrokerConnection
from carrot.messaging import Publisher, Consumer
with:
from kombu.connection import BrokerConnection
from kombu.compat import Publisher, Consumer
No longer have to specify the channel for each operation,
but instead do:
>>> exchange = Exchange("foo", "direct", channel=channel)
>>> exchange.declare()
instead of:
>>> exchange.declare(channel)
As the Exchange/Binding classes is also the specification of an
exchange/binding these instances can be unbound, meaning they
are not associated with a channel. An entity can be bound
the a channel at any time, usually this means creating a copy
of the instance so the original is not affected::
>>> exchange = Exchange("foo", "direct")
>>> bound_exchange = exchange.bind(channel)
>>> bound_exchange.declare()
>>> bound_exchange.delete()
>>> assert exchange is not bound_exchange