Polyconseil / aioamqp

AMQP implementation using asyncio
Other
280 stars 88 forks source link

AttributeError: 'Channel' object has no attribute 'basic_ack' #196

Closed jpVm5jYYRE1VIKL closed 2 years ago

jpVm5jYYRE1VIKL commented 5 years ago

Well. Bit modified example from documentation (https://aioamqp.readthedocs.io/en/latest/api.html#server-cancellation):

....
async def consumer(channel, body, envelope, properties):
    channel.basic_ack(envelope.delivery_tag)
...
channel = await protocol.channel()
await channel.basic_consume(consumer, queue_name="my_queue")
...

In moment when consumer callback get execution get an Exception.

channel.basic_ack(envelope.delivery_tag) AttributeError: 'Channel' object has no attribute 'basic_ack'

And Polyconseil/aioamqp/blob/master/aioamqp/channel.py does not contain basic_ack method. So ACK required queues completely broken. Fixed in Pull #198

RemiCardona commented 2 years ago

Doc was updated in commit 96d9d75eb111c5a13c96265dc185b9ae1586fdc8.