Skip to content

Publishing to a non-existing exchange does not raise errors #221

@greatvovan

Description

@greatvovan

When publishing to a non-existing exchange the module does not raise any exceptions, but any subsequent operation on the channel will raise exceptions.

This code completes without problems, but will throw if uncommented:

import asyncio
import aioamqp

async def main():
    tr, pr = await aioamqp.from_url('amqp://log:pass@host')
    chan = await pr.channel()
    await chan.publish(b'ABC', 'no-such-exchange', '')
    # await chan.publish(b'ABC', 'no-such-exchange', '')
    # await chan.close()
    tr.close()
    await asyncio.sleep(1.0)

asyncio.run(main())

Expected: an exception is raised at the moment of problem operation.

aioamqp==0.14.0
Python 3.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions