KSN supports Apache Kafka® compatible transaction semantics and APIs. For example, you can fetch messages starting from the last consumed offset and process them transactionally one by one, while updating the last consumed offset and generating events.
If a producer sends multiple messages to the same or different partitions and a network connection or broker failure causes the transaction to fail, it can be guaranteed that all messages are either all written to the partition or none are written. This is very important for applications that require strict guarantees, such as financial services transactions.
Transactions ensure exactly-once semantics (EOS) and atomicity.
EOS helps developers avoid anomalies of at-most-once processing (possible event loss) and at-least-once processing (possible event duplication). When transactions are combined with idempotent producers, KSN supports EOS. Atomicity also commits a set of messages across partitions as a unit: either all messages are committed, or none are committed. Encapsulated data received or sent in a single operation can only succeed or fail globally.