Software Ecologist, Architect, Modeler | Optimizer of Teams and Individuals | Domain-Driven Design and Systems Transformation
In messaging, exactly-once delivery is a myth. You've got at-most-once delivery and at-least-once delivery. Don't leave exactly-once delivery *semantics* to your message broker/bus to manage. "The management of uncertainty must be implemented in the business logic" Pat Helland *** Links in comments ***
Watch my talk: "Modeling Uncertainty" https://youtu.be/8Y-XPlXOWoA
Nobody cares about the 'delivery'. What we care about is 'processing' Then it makes sense to say that message will be either: - processed at most once - processed at least once - processed exactly once Delivery, idempotency, deduplication - all build up to processing guarantees that really matter
Oh, I see you've been present in every discussion I've ever had on this subject. If I had an euro for every "What do you mean we can't know?"
Did you remove a mention of Kafka?
I'm sorry but that's not true. It may be that all the current scalable models have that caveat, but a transactional protocol layered into a connection-oriented stream in a non-distributed topology does not have that limitation. You can do "exactly once" this way, but, it may just not be particularly useful. I'll finish this with an admission that you know way, way more about this topic than I do, as I am only just exploring the idea of designing a distributed message queue system right now and am years away from doing so.
Exactly-once is a buzzword for at-least-once + deduplication + idempotent processing.
> "The management of uncertainty must be implemented in the business logic" Agreed, all errors in lower levels eventually affect the business logic, which must react appropriately. The above statement is therefore a truism (although it won't hurt to reiterate it occasionally, as people tend to forget uncomfortable facts.)
I believe exactly-once technically is impossible
Software Ecologist, Architect, Modeler | Optimizer of Teams and Individuals | Domain-Driven Design and Systems Transformation
1wRead Pat Helland's paper: https://queue.acm.org/detail.cfm?id=3025012