SCROLL FOR THE DEFINITIONTRUSTEDTRUCKSN 52.52° / E 13.40°
01DefinitionApache Kafka / Distributed Systems Theory
A distributed messaging guarantee ensuring that each event is processed once and only once, even during network failures.
01 / CANONICAL DEFINITION
What it means.
Exactly-Once Semantics (EoS) guarantees that even if a producer retries publishing a message due to a network timeout, or a consumer restarts after an unexpected crash, the system processes and commits the payload exactly once with zero duplicates and zero data loss.
02 / ROLE IN TRUSTEDTRUCKS
Where it is used.
Guarantees that financial escrow locks, token burns, and carbon certificate minting are never executed more than once per shipment order.
03 / TECHNICAL SPECIFICATION
Combines KafkaJS `idempotent: true` (producer sequence numbers + PID) with database transaction upserts (`ON CONFLICT DO NOTHING`) and Redis idempotency intent leases.
04 / WHAT IT MUST NOT IMPLY
Read it carefully.
EoS requires end-to-end support across producer, transport, and consumer; enabling idempotent producers alone does not guarantee exactly-once database execution.