Your problem is that you mixed two different loops in one. That is why it did not work. You need to make a few changes.
Use AsyncioConnection instead of TornadoConnection
return adapters.AsyncioConnection(pika.URLParameters(self._url), self.on_connection_open)
Then you need to delete the line below
self._connection.ioloop.start() #throws exception but not a problem...
Because your loop is already running in the connection. Then you need to use the code below to wait
loop = asyncio.get_event_loop() loop.run_until_complete(wait_for_eval())
And now it works

Tarun lalwani
source share