From f8b17a973ac806aae2e33397e9594875e3358c96 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 10 Oct 2020 20:40:27 +0200 Subject: [PATCH] Further simplified the example: Removed unnecessary variables --- .../demo/kafka/deduplication/DeduplicationTransformer.java | 5 ----- 1 file changed, 5 deletions(-) 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); -- 2.20.1