Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
Fikset referansen til kafka config
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsmsa committed Feb 21, 2024
1 parent 467955e commit 9746df0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import io.ktor.server.netty.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
import no.nav.paw.config.hoplite.loadNaisOrLocalConfiguration
import no.nav.paw.config.kafka.KAFKA_CONFIG
import no.nav.paw.config.kafka.KAFKA_CONFIG_WITH_SCHEME_REG
import no.nav.paw.config.kafka.KafkaConfig
import no.nav.paw.config.kafka.KafkaFactory
import org.apache.avro.generic.GenericRecord
Expand All @@ -26,7 +28,7 @@ const val PROFILERING = "paw.arbeidssoker-profilering-beta-v2"
val topics = listOf(OPPLYSNINGER_TOPIC, PERIODE_TOPIC, PROFILERING)

fun main() {
val kafkaConfig = loadNaisOrLocalConfiguration<KafkaConfig>("kafka")
val kafkaConfig = loadNaisOrLocalConfiguration<KafkaConfig>(KAFKA_CONFIG_WITH_SCHEME_REG)
val kafkaFactory = KafkaFactory(kafkaConfig)

fun consumer(): Consumer<Long, Any> = kafkaFactory.createConsumer(
Expand Down

0 comments on commit 9746df0

Please sign in to comment.