The Case for Reliable Messaging
The success of interaction between a service consumer and a service provider, is clearly dependent on how much reliable the underlying transport protocol is. However when it comes to networks, we know that even in the most reliable setups, all sorts of things can go wrong.
Let’s consider some scenarios of common problems that might occur during communication between a client and a service.
Scenario 1:
Lets start by the simplest of scenarios: a client tries to send a message to a service. However, during transmission, something goes wrong on the wire, and the message cannot be delivered.

In this case, there should be a way for the client to be notified about the transmission failure, so that it can send the message again.
Scenario 2:
In this scenario, the message is actually received at the service. However, before the service could confirm (or acknowledge) the client that it received the message, again there was a problem in the network, and the service does not receive the acknowledgment. In this case, the client risk sending the same message again, which will result in message duplication at the service side.
Continue reading →