Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
memoriav
M
Memobase 2020
S
services
elastic-services
Search Doc Service
Commits
3d32309a
Commit
3d32309a
authored
Jan 18, 2021
by
Jonas Waeber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that key is always only the id without the namespace.
parent
e9ac8068
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/main/kotlin/KafkaTopology.kt
src/main/kotlin/KafkaTopology.kt
+2
-0
No files found.
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