Sent messages are deleted individually after a crash
authorKai Moritz <kai@juplo.de>
Sun, 31 Jan 2021 21:24:16 +0000 (22:24 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 16 May 2021 22:04:06 +0000 (00:04 +0200)
commitb6d734cd09d3e23171eaf6235d19e73bc11ab420
tree1b517ee07f2d5132e29bb6d6b75650d075f825ca
parent3f41296dae5c094a29f8a89cda2bccfb8bc93c0a
Sent messages are deleted individually after a crash

* If all messages with a sequence-number lower than or equal than the
  sequence number of a message already send are deleted, this can only
  be done for the lowest sequence-number seen accross all partitions
  without violating the at-least-once semantics.
* Deleting seen messages individually by specifying their id (aka
  sequence-number) explicitly in the delete-command allows to delete
  _all_ messages from the outbox, that have been seen on the topic,
  hence, achieving exactly-once-semantics even in the case of an
  unclean shutdown (aka crash) of the OutboxProducer
delivery/src/main/java/de/juplo/kafka/outbox/delivery/OutboxProducer.java
delivery/src/main/java/de/juplo/kafka/outbox/delivery/OutboxRepository.java
delivery/src/main/java/de/juplo/kafka/outbox/delivery/Watermarks.java [deleted file]