0

I’m trying to use RabbitMQ in a containerized microservices infrastructure and, by default, containers are shut down when in idle I wanted to keep this kind of handling of idling but, afaik, the container must be awake in order to listen to messages Is there a way to make RabbitMQ wake up the consumer containers subbed to the interested queue?

I've tried to search online but no one is making any reference to what I needed

What I imagined is something that works like this:

                                               ┌────────────► Consumer
                                               │
Producer ─── message ────► RabbitMQ ── wakes ──┼────────────► Consumer
                                               │
                                               └────────────► Consumer

Then, RabbitMQ after triggered the containers should deliver the messages


                           ┌────────────► Consumer
                           │
      RabbitMQ ── message -┼────────────► Consumer
                           │
                           └────────────► Consumer

When a container wakes creates a channel so what I really need is just the "wake" command on message that should be sent, as told before only to interested containers/microservices

InsalataCondita
  • 301
  • 1
  • 6

1 Answers1

0

You can have a "management" pod that is always up & running and consumes messages from the queue, and decides when to create the consumer pods. You can create the pods via API as you can see here.

Cosmin Ioniță
  • 3,598
  • 4
  • 23
  • 48
  • Thank you for your answer! As I can understand (correct me if I'm wrong) there is a way to declare to RabbitMQ the address of every microservice to interact with. My question now is, how can RabbitMQ keep trace of what microservice is subscribed to a queue? – InsalataCondita Jul 21 '23 at 14:27