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>
Sat, 6 Feb 2021 18:11:30 +0000 (19:11 +0100)
commit7dffda91e6aac4bd67e4ae9722db0439e31359eb
treef4e03eb31962b836da46713d1937e53c460bf32d
parent724def8b418ad48dcc2838b01058cf12ccb50a55
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]