Skip to content

Commit

Permalink
Add deserializer config
Browse files Browse the repository at this point in the history
  • Loading branch information
torchr89 committed Oct 17, 2023
1 parent 65bcaea commit 25a21b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/no/nav/syfo/kafka/config/AivenKafkaConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import org.apache.kafka.clients.CommonClientConfigs
import org.apache.kafka.clients.CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG
import org.apache.kafka.clients.consumer.ConsumerConfig
import org.apache.kafka.common.config.SslConfigs
import org.apache.kafka.common.serialization.StringDeserializer
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
Expand Down Expand Up @@ -48,6 +49,8 @@ class AivenKafkaConfig(
val config = mapOf(
ConsumerConfig.GROUP_ID_CONFIG to "aktivitetskrav-backend-group",
ConsumerConfig.AUTO_OFFSET_RESET_CONFIG to kafkaAutoOffsetReset,
ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG to StringDeserializer::class.java,
ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG to StringDeserializer::class.java,
ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG to false,
ConsumerConfig.MAX_POLL_RECORDS_CONFIG to "1",
ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG to "600000"
Expand Down

0 comments on commit 25a21b7

Please sign in to comment.