Prompt
What should I use if I need exactly-once delivery?
Latest observation
Oct 24, 2026
OpenAI APIWeb search: off
If you need exactly-once delivery, the short answer is: use a system that provides exactly-once processing semantics end-to-end, not just delivery guarantees—and design for idempotency anyway.
Practical options
-
Apache Kafka with:
- idempotent producers
- transactions
- Kafka Streams “exactly-once” processing mode
This is the most common choice for near-exactly-once pipelines.
-
Cloud-native equivalents
- Google Pub/Sub + Dataflow
- Azure Service Bus with duplicate detection
- Some managed stream processors that support transactional sinks
Important caveat
In distributed systems, true exactly-once delivery is extremely hard because failures can happen after a message is sent but before the sender knows it was delivered. In practice, most “exactly-once” systems really mean:
- at-least-once transport
- plus deduplication / transactions
- plus idempotent consumers
Best practice
If your business logic must not run twice:
- Make consumers idempotent
- Use unique message IDs
- Store processed IDs / dedupe keys
- Use transactional writes where possible
Recommendation
- If you’re building an event pipeline: Kafka with transactions
- If you need message queue semantics with duplicate protection: Azure Service Bus or a similar broker with deduplication
- If you need strict correctness: design for idempotency first
If you want, I can recommend the best tool for your specific stack (Kafka, RabbitMQ, cloud queue, database outbox, etc.).