Commit 94909045 authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

MEMO-740: Set max.poll.records to 10

The IngestService needs more time if a lot of binary resources need to be ingested. It then can't commit the read messages on the next poll. By setting a lower limit for max.poll.records the next poll on the Kafka topic should occur before the default of 5 minutes has expired.
parent b6de864d
Pipeline #15076 passed with stages
in 5 minutes and 12 seconds
......@@ -32,6 +32,7 @@ class Service(fileName: String = "app.yml") : Closeable {
companion object {
const val FEDORA_PROPERTIES_PREFIX = "fedora"
fun createFedoraClient(appSettings: Properties): FedoraClient {
return FedoraClientImpl.builder()
......@@ -58,7 +59,9 @@ class Service(fileName: String = "app.yml") : Closeable {
private var producer: Producer
init {
consumer = Consumer(settings.kafkaConsumerSettings, settings.inputTopic)
val consumerSettings = settings.kafkaConsumerSettings
consumerSettings.setProperty("max.poll.records", CONSUMER_MAX_POLL_RECORDS)
consumer = Consumer(consumerSettings, settings.inputTopic)
producer = Producer(settings.kafkaProducerSettings, settings.outputTopic)"Connected to Kafka.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment