Right now I'm using
Direct Exchanges (i.e. one queue per "topic", pretty much pushing messages directly to a queue). This works OK, but I'd like the flexibility of working with
Topic Exchanges, specifically multiple consumers subscribing to topics without destroying the message (i.e. multiple queues per topic).
The complications are as follows:
- We'd like the queue to be filled up by the producers even if all consumers are down
- We'd like to still be able to have multiple consumers be spun up to handle the work given to any one queue.
In my research, it's been bizzarely difficult to nail down an answer to these concerns.
- Some sources say that a topic exchange's queues and messages will remain persisted even when consumers are down as long as they've been started at least once, while others state that when the consumer stops consuming at any time the queue will stop receiving messages. I've been digging but cannot seem to find an authoritative answer.
- It appears as though we can hard-code the queue names via the consumer config, thus allowing multiple consumers to handle the work built up in a queue. Is this correct? Is it best practice?
If possible, please post an authoritative source for your answer so that others may find this in future reference. In my experience, RabbitMQ's docs are not the easiest to maneuver through, but I may just be doing it wrong.