diff --git a/nais-dev.yaml b/nais-dev.yaml index 6f0be85..3b5a7d0 100644 --- a/nais-dev.yaml +++ b/nais-dev.yaml @@ -23,7 +23,7 @@ spec: timeout: 10 replicas: min: 1 - max: 2 + max: 1 cpuThreasholdPercentage: 50 resources: limits: diff --git a/src/main/kotlin/no/nav/fo/veilarbvarsel/config/kafka/KafkaConsumerWrapper.kt b/src/main/kotlin/no/nav/fo/veilarbvarsel/config/kafka/KafkaConsumerWrapper.kt index 0a8e3ce..ae39ff8 100644 --- a/src/main/kotlin/no/nav/fo/veilarbvarsel/config/kafka/KafkaConsumerWrapper.kt +++ b/src/main/kotlin/no/nav/fo/veilarbvarsel/config/kafka/KafkaConsumerWrapper.kt @@ -42,7 +42,9 @@ abstract class KafkaConsumerWrapper( consumer.use { while (!shutdown) { - val records = consumer.poll(Duration.ofMillis(100)) + val records = consumer.poll(Duration.ofMillis(5000)) + + logger.info("Getting records from $topics. size: ${records.count()}") records.iterator().forEach { handle(it.value()) diff --git a/src/main/kotlin/no/nav/fo/veilarbvarsel/config/kafka/KafkaProducerWrapper.kt b/src/main/kotlin/no/nav/fo/veilarbvarsel/config/kafka/KafkaProducerWrapper.kt index 265d1f8..ed9a67a 100644 --- a/src/main/kotlin/no/nav/fo/veilarbvarsel/config/kafka/KafkaProducerWrapper.kt +++ b/src/main/kotlin/no/nav/fo/veilarbvarsel/config/kafka/KafkaProducerWrapper.kt @@ -16,6 +16,8 @@ class KafkaProducerWrapper( private val producer: KafkaProducer = KafkaProducer(properties) fun send(key: K, event: V, callback: KafkaCallback?) { + log.info("[$topic]: $key: $event") + ProducerRecord(topic, key, event).let { producer.send((it)) { _, exception -> if (exception == null) {