librabbitmq icon indicating copy to clipboard operation
librabbitmq copied to clipboard

Missing exchange_bind implementation

Open lelithium opened this issue 5 years ago • 1 comments

librabbitmq does not implement exchange_bind for the Channel object. This is especially visible when using Kombu.

Versions:

  • librabbitmq==2.0.0
  • kombu==4.6.7

Bug:

from kombu import Connection, Exchange
conn = Connection("amqp://user:password@host//")
conn.transport_cls  # yields librabbitmq
Exchange("some_exchange", channel=conn.channel()).declare()
Exchange("some_exchange", channel=conn.channel()).bind_to("amq.topic", routing_key="some_key")
# raises AttributeError: 'Channel' object has no attribute 'exchange_bind'

Using pyamqp to demonstrate the expected behaviour:

from kombu import Connection, Exchange
conn = Connection("amqp://user:password@host//", transport="pyamqp")
conn.transport_cls  # yields pyamqp
Exchange("some_exchange", channel=conn.channel()).declare()
Exchange("some_exchange", channel=conn.channel()).bind_to("amq.topic", routing_key="some_key")

lelithium avatar Feb 10 '20 16:02 lelithium

PRs welcome.

thedrow avatar Feb 16 '20 13:02 thedrow