asyncapi-python icon indicating copy to clipboard operation
asyncapi-python copied to clipboard

AMQP support

Open themanifold opened this issue 4 years ago • 2 comments

Are there plans to support AMQP? And if there are not, could you point me to the right places in the code so that maybe I could try and implement it myself?

themanifold avatar Jan 14 '21 09:01 themanifold

Ah, I see we're using the https://github.com/encode/broadcaster library, which doesn't yet support AMQP, though it doesn't seem too hard to implement the methods that are needed using something like https://github.com/mosquito/aiormq

themanifold avatar Jan 14 '21 10:01 themanifold

I'm thinking that I need to implement the following methods in asyncacpi/events/backends/amqp.py

class AmqpBackend():
    def __init__():
        pass
    
    async def connect():
        pass

    async def disconnect():
        pass

    async def publish():
        pass
    
    async def subscribe():
        pass

and at least the subscribe method need to yield .event as I see it in api.py:listen.

themanifold avatar Jan 14 '21 11:01 themanifold