AsyncIO or Threading to consume RabbitMQ messages in a web service ? /u/Icy_Zookeepergame201 Python Education

I am building a Python micro service using FastAPI. I have some basic REST API endpoints, with services, etc.

I would like my application to consume messages from a RabbitMQ message queue. I already wrote my consumer class (with pika) but I was wondering what was the best approach to run the consumer on the application start.

I do not really understand the differences between AsyncIO, Multiprocess and classic Threading in Python. What would be the best way to consume the message without blocking my program ?

submitted by /u/Icy_Zookeepergame201
[link] [comments]

​r/learnpython I am building a Python micro service using FastAPI. I have some basic REST API endpoints, with services, etc. I would like my application to consume messages from a RabbitMQ message queue. I already wrote my consumer class (with pika) but I was wondering what was the best approach to run the consumer on the application start. I do not really understand the differences between AsyncIO, Multiprocess and classic Threading in Python. What would be the best way to consume the message without blocking my program ? submitted by /u/Icy_Zookeepergame201 [link] [comments] 

I am building a Python micro service using FastAPI. I have some basic REST API endpoints, with services, etc.

I would like my application to consume messages from a RabbitMQ message queue. I already wrote my consumer class (with pika) but I was wondering what was the best approach to run the consumer on the application start.

I do not really understand the differences between AsyncIO, Multiprocess and classic Threading in Python. What would be the best way to consume the message without blocking my program ?

submitted by /u/Icy_Zookeepergame201
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *