D
D
Dmitry Filyushin2020-11-18 13:30:17
Python
Dmitry Filyushin, 2020-11-18 13:30:17

How to run an asynchronous rabbitmq queue listener in python?

There is a subscriber to the rabbitmq queue. How to run it in asynchronous mode?
And how to run for tests at once?

try:
        loop = asyncio.get_event_loop()
        loop.run_until_complete(consumer.run_manager_async())
        loop.run_forever()
    except KeyboardInterrupt:
        pass
    except Exception as exception:
        logger.error(exception)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question