Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Elasticsearch Services
Search Doc Service
Commits
3d32309a
Commit
3d32309a
authored
Jan 18, 2021
by
Jonas Waeber
Browse files
Ensure that key is always only the id without the namespace.
parent
e9ac8068
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/kotlin/KafkaTopology.kt
View file @
3d32309a
...
...
@@ -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
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment