Skip to content

Commit

Permalink
Added Unit Test for Processed Map Deduplication
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Wiens committed May 7, 2024
1 parent 0c88989 commit 42c6c18
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ public Topology buildTopology() {

KStream<String, ProcessedMap<String>> inputStream = builder.stream(inputTopic, Consumed.with(Serdes.String(), JsonSerdes.ProcessedMapWKT()));

inputStream.print(Printed.toSysOut());

KStream<String, ProcessedMap<String>> deduplicatedStream = inputStream
.groupByKey(Grouped.with(Serdes.String(), JsonSerdes.ProcessedMapWKT()))
.aggregate(() -> new ProcessedMapWktPair(new ProcessedMap<String>(), true),
Expand Down
7 changes: 7 additions & 0 deletions jpo-deduplicator/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ kafka.topics:
- name: topic.DeduplicatedProcessedMap
cleanupPolicy: delete
retentionMs: 300000
- name: topic.ProcessedMapWKT
cleanupPolicy: delete
retentionMs: 300000
- name: topic.DeduplicatedProcessedMapWKT
cleanupPolicy: delete
retentionMs: 300000
- name: topic.OdeMapJson
cleanupPolicy: delete
retentionMs: 300000
Expand All @@ -38,4 +44,5 @@ kafka.topics:
- name: topic.DeduplicatedOdeTimJson
cleanupPolicy: delete
retentionMs: 300000


Loading

0 comments on commit 42c6c18

Please sign in to comment.