Skip to content

Commit

Permalink
set max records to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffen Lien committed Feb 1, 2022
1 parent b358bb1 commit 7c83fcc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Deploy (dev)

# on:
# push:
# branches: [dev]
on:
push:
branches: [dev]
branches: [feature/tc-273-adjust-kafka-for-arena]

env:
IMAGE_TAG: ${{ github.sha }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import no.nav.common.kafka.consumer.KafkaConsumerClient
import no.nav.common.kafka.consumer.util.KafkaConsumerClientBuilder
import no.nav.common.kafka.consumer.util.deserializer.Deserializers.stringDeserializer
import no.nav.common.kafka.util.KafkaPropertiesBuilder
import no.nav.common.kafka.util.KafkaPropertiesPreset
import no.nav.mulighetsrommet.api.database.DatabaseFactory
import org.apache.kafka.clients.consumer.ConsumerRecord
import org.apache.kafka.common.serialization.ByteArrayDeserializer
Expand Down Expand Up @@ -50,7 +49,17 @@ class KafkaFactory(private val db: DatabaseFactory) {
.withDeserializers(ByteArrayDeserializer::class.java, ByteArrayDeserializer::class.java)
.build()
} else {
KafkaPropertiesPreset.aivenDefaultConsumerProperties(consumerGroupId)
// KafkaPropertiesPreset.aivenDefaultConsumerProperties(consumerGroupId)
KafkaPropertiesBuilder.consumerBuilder()
.withBaseProperties(1)
.withConsumerGroupId(consumerGroupId)
.withAivenBrokerUrl()
.withAivenAuth()
.withDeserializers(
ByteArrayDeserializer::class.java,
ByteArrayDeserializer::class.java
)
.build()
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package no.nav.mulighetsrommet.api

import io.kotest.core.spec.style.FunSpec
import io.ktor.application.*
import io.ktor.http.*
import io.ktor.server.testing.*
import io.ktor.application.Application
import io.ktor.http.HttpMethod
import io.ktor.server.testing.handleRequest
import io.ktor.server.testing.withTestApplication
import kotlin.test.assertEquals

class ApplicationTest : FunSpec({
Expand Down

0 comments on commit 7c83fcc

Please sign in to comment.