Answer the question
In order to leave comments, you need to log in
How to set tickrate in aio-pika (asyncio)?
from aio_pika import *
import asyncio
loop = asyncio.get_event_loop()
async def on_message(message: IncomingMessage):
print("Message body is: %r" % message.body)
async def listen():
connection = await connect("amqp://guest:[email protected]/", loop=loop)
channel = await connection.channel()
queue = await channel.declare_queue("my_queue", durable=False)
await queue.consume(on_message, no_ack=True)
if __name__ == '__main__':
loop.create_task(listen())
loop.run_forever()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question