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 b7ab09a
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
@@ -1,5 +1,6 @@
package no.nav.syfo.kafka.config

import com.fasterxml.jackson.databind.deser.std.StringDeserializer
import org.apache.kafka.clients.CommonClientConfigs
import org.apache.kafka.clients.CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG
import org.apache.kafka.clients.consumer.ConsumerConfig
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 b7ab09a

Please sign in to comment.