3 ms·
You can use a direct queue for this. Just have the phone, desktop, laptop, et. al. consume from the same queue. Rabbit gives out messages in a round-robin to th
by rickhanlonii 13y ago
You can use a direct queue for this. Just have the phone, desktop, laptop, et. al. consume from the same queue. Rabbit gives out messages in a round-robin to the listening consumers, and the first to pickup the message is the only queue to get the message.
Then, let's say there's an error in the phone notification and you want to pass it back and let the next service try. This is where Rabbit's ACK system can come into play: you can setup rabbit to wait for an ACK response from a consumer acknowledging that the message was received and processed. If the consumer errors, you can return the message back to Rabbit and it will be given to the next consumer in line (which is the next consumer not busy).
If a service is not online, then they won't be consuming from the queue, so they won't get the message. If there are no consumers, then the message will wait in the queue until a consumer binds to consume the message.
Hope this makes sense!