Answer the question
In order to leave comments, you need to log in
Pika + RabbitMQ + Tornado. Is basic_publish method asynchronous or not?
Hello. Maybe I’ll describe the question a little ornately and maybe not quite correctly, but I hope it will be clear to those who know.
I am learning to write asynchronous code. Pika has a TornadoConnection adapter, through it I create an asynchronous channel, I create a queue, the application tornado is created and launched. Now I want to add a message to the queue using the basic_publish method. in turn, channel.basic_publish(...)
I call inside a separately created caroutine (a function with a decorator ). The question is, does basic_publish work asynchronously or not inside the caroutine? or do you need to write a call to this function with yield:
yield channel.basic_publish(...)
so that it would work asynchronously? Thank you.
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