Skip to content

Commit

Permalink
Fixed kafka errors
Browse files Browse the repository at this point in the history
  • Loading branch information
2martens committed Oct 28, 2023
1 parent f089d70 commit 517f2b4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 26 deletions.
20 changes: 0 additions & 20 deletions .run/MainApplication.run.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package de.twomartens.wahlrecht.configuration

import org.apache.kafka.clients.admin.AdminClientConfig
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.kafka.core.KafkaAdmin

@Configuration
open class KafkaConfiguration {

Check warning on line 10 in module-server/src/main/kotlin/de/twomartens/wahlrecht/configuration/KafkaConfiguration.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Class "KafkaConfiguration" is never used
@Value(value = "\${spring.kafka.bootstrap-servers[0]}")
private val bootstrapServers: List<String> = mutableListOf()

@Bean
open fun kafkaAdmin(): KafkaAdmin {

Check warning on line 15 in module-server/src/main/kotlin/de/twomartens/wahlrecht/configuration/KafkaConfiguration.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Function "kafkaAdmin" is never used
val configs: MutableMap<String, Any?> = HashMap()
configs[AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG] = bootstrapServers.first()
return KafkaAdmin(configs)
}
}
6 changes: 0 additions & 6 deletions module-server/src/main/resources/application-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,5 @@ spring:
import:
- "configserver:${CONFIGSERVER_SCHEME:http}://${CONFIGSERVER_HOST:configserver}:${CONFIGSERVER_PORT:8888}${CONFIGSERVER_PREFIX:/config}"
kafka:
producer:
bootstrap-servers:
- ${KAFKA_HOST:kafka}:${KAFKA_PORT:9092}
consumer:
bootstrap-servers:
- ${KAFKA_HOST:kafka}:${KAFKA_PORT:9092}
bootstrap-servers:
- ${KAFKA_HOST:kafka}:${KAFKA_PORT:9092}

0 comments on commit 517f2b4

Please sign in to comment.