Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IS-1652: Use correct topic when resubscribing #317

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/main/kotlin/no/nav/syfo/kafka/KafkaTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package no.nav.syfo.kafka

import no.nav.syfo.application.ApplicationState
import no.nav.syfo.application.backgroundtask.launchBackgroundTask
import no.nav.syfo.identhendelse.kafka.PDL_AKTOR_TOPIC
import org.apache.kafka.clients.consumer.KafkaConsumer
import java.util.*

Expand All @@ -22,7 +21,7 @@ inline fun <reified ConsumerRecordValue> launchKafkaTask(

while (applicationState.ready) {
if (kafkaConsumer.subscription().isEmpty()) {
kafkaConsumer.subscribe(listOf(PDL_AKTOR_TOPIC))
kafkaConsumer.subscribe(listOf(topic))
}
kafkaConsumerService.pollAndProcessRecords(kafkaConsumer)
}
Expand Down