From: Kai Moritz Date: Sat, 10 Oct 2020 18:40:27 +0000 (+0200) Subject: Further simplified the example: Removed unnecessary variables X-Git-Tag: rebase--2024-05-05--07-45 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fstream-deduplicator;p=demos%2Fkafka%2Fdeduplication Further simplified the example: Removed unnecessary variables --- diff --git a/src/main/java/de/juplo/demo/kafka/deduplication/DeduplicationTransformer.java b/src/main/java/de/juplo/demo/kafka/deduplication/DeduplicationTransformer.java index dc888bc..2494672 100644 --- a/src/main/java/de/juplo/demo/kafka/deduplication/DeduplicationTransformer.java +++ b/src/main/java/de/juplo/demo/kafka/deduplication/DeduplicationTransformer.java @@ -1,7 +1,6 @@ package de.juplo.demo.kafka.deduplication; import lombok.extern.slf4j.Slf4j; -import org.apache.kafka.common.header.Headers; import org.apache.kafka.streams.kstream.ValueTransformer; import org.apache.kafka.streams.processor.ProcessorContext; import org.apache.kafka.streams.state.KeyValueStore; @@ -28,11 +27,7 @@ public class DeduplicationTransformer implements ValueTransformer transform(String value) { - String topic = context.topic(); Integer partition = context.partition(); - long offset = context.offset(); - Headers headers = context.headers(); - long sequenceNumber = Long.parseLong(value); Long seen = store.get(partition);