The OutboxProducer restores the sequence-number from the wirtten topic
authorKai Moritz <kai@juplo.de>
Sat, 30 Jan 2021 21:39:41 +0000 (22:39 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 16 May 2021 21:53:16 +0000 (23:53 +0200)
commita92d318043bf698dc2a949db2b76893c8abf03a1
tree943ff77d7457d9a0d3a3c769b2e1a0f63fe738d2
parent374dcbb90bcafe7682a8626de94ed0cd4c377e5e
The OutboxProducer restores the sequence-number from the wirtten topic

* The OutboxProducer consumes the written messages on start-up, extracts the
  send sequence-numbers and recalculates the seen watermarks and the maximal
  sequence-number, for at-least-once semantics.
* This implementation will most probably resend some messages after a crash,
  but it will never skip any unsend messages.
* Messages may be resend despite the recalculated watermarks, because only
  messages with a sequence number lower than the lowest watermark can be
  discarded safely from the outbox, if message-loss is not acceptable.
* Deactivated the integration-test for the loading of the context, because
  it cannot work without an available Kafka-Cluster.
delivery/src/main/java/de/juplo/kafka/outbox/delivery/OutboxProducer.java
delivery/src/main/java/de/juplo/kafka/outbox/delivery/Watermarks.java
delivery/src/test/java/de/juplo/kafka/outbox/delivery/ApplicationTests.java [deleted file]