In the world of MQ(message queue) systems like Kafka, there are lots of discussions about exactly-once
semantics. As I understood, the exactly-once
semantics can be applied to every distributed system, not only to MQ system but also RDBMS, but less discussed. I think people do concern exactly-once semantics and struggle to ensure the message to be delivered only once as possible when they use MQ systems like Apache Kafka. However, it doesn’t seem to be as much of a concern for RDBMS, does it? (the real-world possibility of exactly-once itself is out of the question)
So, here is the question : How can I assure that RDBMS execute the query only once ?
I assume that this might be guaranteed(even though it is imperfect) by transaction with ACID properties, WAL or anything else, then another question comes up : why don’t MQ systems utilize them to support exactly-once semantics ?
For example, Apache Kafka supports exactly once semantics under the cluster, when there are no side-effects. However, at the very simple situation like producer -> cluster
or cluster -> consumer
each, the exactly-once semantics cannot be applied, right ? You can produce a message twice, or also consume a message twice when something goes wrong.
I beg your understanding if this seems like a silly question due to my lack of knowledge. In case of my ignorance, please fix me. Thanks ahead.