Sobes.tech
Intern

What is at-least-once and exactly-once delivery? How do they differ and what are their pros and cons?

sobes.tech AI

Answer from AI

At-least-once delivery guarantees that the message will be delivered to the recipient at least once. This means that sometimes the same message may be received multiple times (duplicates are possible).

Exactly-once delivery guarantees that each message will be delivered exactly once, without duplicates.

Pros and cons:

  • At-least-once:

    • Simple implementation.
    • High delivery reliability.
    • Duplicates may occur, requiring handling on the recipient's side.
  • Exactly-once:

    • No duplicates, simplifying processing logic.
    • More difficult to implement, requires additional mechanisms (e.g., idempotency, transactions).
    • May be slower due to overhead.

In IoT, at-least-once is often chosen due to resource constraints and the need to guarantee delivery, while duplicate handling is done at the application level.

What is at-least-once and exactly-once delivery? How… - sobes.tech