I have a contenerized Django
application, which I deployed on Google Cloud Run
. For the most time no requests are made to the app, so GCP
can reduce it to 0 instances (and the billing is small). Some requests provide time consuming tasks and I need to handover them to another service by RabbitMQ
(or possibly another message broker). I wanted to use pika at the Django
app side, but if I understand correctly it forces it to be running all the time.
So is there a solution, where I can pass messages to message broker from Django
app and also listen to message queue, but the app can reduce to 0 instances when the queue is empty (and increase instances if it's not)?
Thanks