A client wanted a highly available system while ensuring that no events are lost.
My initial solution was to add a queue in between to maintain downtime between services.
Let's say we are sending events from Service A to Service B. If Service B is down, the events sent from Service A would be lost.
Solution is to add a queue in between which acts as a temporary storage in case of such issues.
If Service B is down, the queue will continue to receive inputs from Service A, while storing them temporarily until Service B is back up again. Once Service B is back again, the queue will then send the events to process.
Thus, ensuring that no events are lost due to downtime!
P.S: This is the second major use case of queue. First one was covered in the earlier post: Balancing Load with Queue