Verbesserungen / Korrekturen aus `sumup-adder--ohne-stored-offsets' gemerged
authorKai Moritz <kai@juplo.de>
Sun, 28 Aug 2022 15:57:45 +0000 (17:57 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 28 Aug 2022 15:57:45 +0000 (17:57 +0200)
* Merge branch 'sumup-adder--ohne-stored-offsets' into sumup-adder
* Conflicts:
** src/main/java/de/juplo/kafka/ApplicationConfiguration.java
** src/main/java/de/juplo/kafka/ApplicationRebalanceListener.java
** src/main/java/de/juplo/kafka/EndlessConsumer.java
** src/main/java/de/juplo/kafka/PollIntervalAwareConsumerRebalanceListener.java
* Logik-Änderungen gegenüber der Implementierung mit Speicherung der
  Offsets in der Mongo-DB anstatt in Kafka in dem Branch 'sumup-adder'
  aus dem Merge entfernt.

Merge remote-tracking branch 'origin/sumup-adder--ohne--stored-offsets' into sumup-adder
"Committed offset must be at most equal to the offset of the consumer"

1  2 
README.sh
docker-compose.yml
src/main/java/de/juplo/kafka/ApplicationConfiguration.java
src/main/java/de/juplo/kafka/ApplicationRebalanceListener.java
src/main/java/de/juplo/kafka/EndlessConsumer.java
src/test/java/de/juplo/kafka/GenericApplicationTests.java

diff --cc README.sh
Simple merge
@@@ -132,8 -132,10 +132,9 @@@ services
        sumup.adder.bootstrap-server: kafka:9092
        sumup.adder.client-id: adder-1
        sumup.adder.commit-interval: 3s
+       sumup.adder.throttle: 3ms
        spring.data.mongodb.uri: mongodb://juplo:training@mongo:27017
        spring.data.mongodb.database: juplo
 -      logging.level.org.apache.kafka.clients.consumer: DEBUG
  
    adder-2:
      image: juplo/sumup-adder:1.0-SNAPSHOT
        sumup.adder.bootstrap-server: kafka:9092
        sumup.adder.client-id: adder-2
        sumup.adder.commit-interval: 3s
+       sumup.adder.throttle: 3ms
        spring.data.mongodb.uri: mongodb://juplo:training@mongo:27017
        spring.data.mongodb.database: juplo
 -      logging.level.org.apache.kafka.clients.consumer: DEBUG
  
    peter:
      image: juplo/toolbox
@@@ -7,7 -7,7 +7,8 @@@ import org.springframework.boot.context
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  
 +import java.time.Clock;
+ import java.util.Optional;
  import java.util.Properties;
  import java.util.concurrent.ExecutorService;
  import java.util.concurrent.Executors;
@@@ -19,10 -16,7 +19,10 @@@ public class ApplicationRebalanceListen
    private final AdderResults adderResults;
    private final StateRepository stateRepository;
    private final String id;
-   private final Consumer<String, String> consumer;
 +  private final String topic;
 +  private final Clock clock;
 +  private final Duration commitInterval;
+   private final Consumer consumer;
  
    private final Set<Integer> partitions = new HashSet<>();