Delivery Semantics

  • Types of delivery are: at-least-once, exactly-once, and at-most-once.
  • At-most-once is trivial: the sender can fire and forget.
  • At-least-once is trivial: the sender retries indefinitely until a response is recieved.
    • Not really, because of lingering network partitions.
  • Exactly-once delivery is non-trivial:
    • If an ack is dropped, how does the sender know whether or not to resend?
    • If a message never makes it to the receiver, how does the sender whether or not to resend?
    • If an ack is delayed, does the sender resend?
  • The only way to achieve exactly-once semantics in practice is to use at-least-once semantics in conjunction with idempotence.