Skip to content

Commit

Permalink
FDP-2607: fix compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Loes Immens <[email protected]>
  • Loading branch information
loesimmens committed Sep 23, 2024
1 parent 7dd0ca6 commit 40973e2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package org.gxf.servicetemplate.kafka.configuration

import com.gxf.utilities.kafka.avro.AvroDeserializer
import com.gxf.utilities.kafka.avro.AvroSerializer
import org.apache.avro.specific.SpecificRecordBase
import org.gxf.service.Measurement
import org.apache.kafka.common.serialization.StringDeserializer
import org.apache.kafka.common.serialization.StringSerializer
Expand All @@ -30,18 +31,18 @@ class KafkaConfiguration(val kafkaProperties: KafkaProperties, private val sslBu
KafkaTemplate(producerFactory)

@Bean
fun consumerFactory(): ConsumerFactory<String, Measurement> =
fun consumerFactory(): ConsumerFactory<String, SpecificRecordBase> =
DefaultKafkaConsumerFactory(
kafkaProperties.buildConsumerProperties(sslBundles),
StringDeserializer(),
AvroDeserializer(Measurement.getDecoder())
AvroDeserializer(listOf(Measurement.getClassSchema()))
)

@Bean
fun producerFactory(): ProducerFactory<String, Measurement> =
fun producerFactory(): ProducerFactory<String, SpecificRecordBase> =
DefaultKafkaProducerFactory(
kafkaProperties.buildProducerProperties(sslBundles),
StringSerializer(),
AvroSerializer(Measurement.getEncoder())
AvroSerializer()
)
}

0 comments on commit 40973e2

Please sign in to comment.