I am building a service that receives messages from rabbitmq using pika. and push messages to clients using socket.io.
The socket.io server and pika server are both blocking the main thread.
This will be the same also for celery with flask or Django.
What is the proper approach to solving this and run them both under the same context?
You can use the
Pub/Submodel, Start the consume process in another thread register user that want to receive from the queue and send data to subscribed users.