Commit 3d32309a authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Ensure that key is always only the id without the namespace.

parent e9ac8068
......@@ -24,6 +24,7 @@ import ch.memobase.settings.SettingsLoader
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
import java.io.StringWriter
import org.apache.kafka.streams.KeyValue
import org.apache.kafka.streams.StreamsBuilder
import org.apache.kafka.streams.Topology
import org.apache.kafka.streams.kstream.KStream
......@@ -154,6 +155,7 @@ class KafkaTopology(
jsonWriter.writeValue(out, value)
out.toString()
}
.map { key, value -> KeyValue(key.substringAfterLast("/"), value) }
.to(settings.outputTopic)
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment