- more tidying up

- setting up distribution plugin
- using more variables for mod config
This commit is contained in:
Adam 2021-12-02 00:54:15 +01:00
parent afbfeda616
commit 7091f7648d
34 changed files with 293 additions and 169 deletions

View file

@ -1,6 +1,7 @@
package dev.adamko.kafkatorio.processor
import dev.adamko.kafkatorio.events.schema.FactorioEvent
import dev.adamko.kafkatorio.events.schema.FactorioObjectData
import dev.adamko.kafkatorio.events.schema.jsonMapper
import dev.adamko.kafkatorio.processor.config.ApplicationProperties
import java.time.Duration
@ -25,7 +26,7 @@ fun main() {
.mapValues { readOnlyKey, value ->
println("Mapping $readOnlyKey:$value")
// jsonMapper.decodeFromString<FactorioEvent<*>>(value)
KotlinxSerialization.asA<FactorioEvent<*>>(value)
KotlinxSerialization.asA<FactorioEvent<FactorioObjectData>>(value)
}
.to(TopicNameExtractor { key, value, recordContext ->
value.data.objectName