Skip to content

Commit

Permalink
added a log to easily see what kafka rapid is doing
Browse files Browse the repository at this point in the history
  • Loading branch information
tuantrannav committed Aug 3, 2023
1 parent eac57f4 commit b147298
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hm-rapids-and-rivers-v2-micronaut/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
implementation(project(":hm-rapids-and-rivers-v2-core"))
runtimeOnly("org.yaml:snakeyaml")
implementation("io.micronaut:micronaut-jackson-databind")

kapt("io.micronaut:micronaut-inject")
implementation("io.micronaut:micronaut-runtime")
implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
testImplementation("io.micronaut.test:micronaut-test-junit5")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ import jakarta.inject.Singleton
import no.nav.helse.rapids_rivers.KafkaConfig
import no.nav.helse.rapids_rivers.KafkaRapid
import no.nav.helse.rapids_rivers.KafkaRapidMetrics
import org.slf4j.LoggerFactory

@Factory
@Requires(property = "rapidsandrivers.enabled", notEquals="false", defaultValue = "true")
class RapidsRiversFactory {

companion object {
private val LOG = LoggerFactory.getLogger(RapidsRiversFactory::class.java)
}
@Singleton
fun createKafkaRapid(kafkaProps: KafkaProperties): KafkaRapid {
LOG.info("Creating kafka rapid service with bootstrap server to: ${kafkaProps.brokers}")
val kafkaConfig = KafkaConfig(
bootstrapServers =kafkaProps.brokers,
consumerGroupId = kafkaProps.consumerGroupId,
Expand Down

0 comments on commit b147298

Please sign in to comment.