Skip to content

Commit

Permalink
style: adjust kafka publisher style
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-acampora committed Feb 15, 2023
1 parent bd16b78 commit 5742879
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/kotlin/infrastructure/kafka/KafkaPublisher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ class KafkaPublisher : EventPublisher<Event<Any>> {
init {
listOf(System.getenv("BOOTSTRAP_SERVER_URL"), System.getenv("SCHEMA_REGISTRY_URL")).forEach {
requireNotNull(it) {
println("""
Invalid environment variable!
Check the documentation here: https://github.com/SmartOperatingBlock/bootstrap")
""".trimIndent())
println(
"""
Invalid environment variable!
Check the documentation here:
https://github.com/SmartOperatingBlock/bootstrap")"""
.trimIndent()
)
}
}
}
Expand All @@ -35,7 +38,7 @@ class KafkaPublisher : EventPublisher<Event<Any>> {
"schema.registry.url" to System.getenv("SCHEMA_REGISTRY_URL"),
"key.serializer" to "org.apache.kafka.common.serialization.StringSerializer",
"value.serializer" to KafkaJsonSerializer::class.java
)
)

private val eventToTopic: Map<String, String> = mapOf(
"ROOM_EVENT" to "room-events",
Expand Down

0 comments on commit 5742879

Please # to comment.