com.github.thake.kafka.avro4k.serializer.KafkaAvro4kDeserializerConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avro4k-kafka-serializer Show documentation
Show all versions of avro4k-kafka-serializer Show documentation
Provides Kafka SerDes and Serializer / Deserializer implementations for avro4k
package com.github.thake.kafka.avro4k.serializer
import org.apache.kafka.common.config.ConfigDef
class KafkaAvro4kDeserializerConfig(props: Map) : AbstractKafkaAvro4kSerDeConfig(
baseConfigDef().define(
RECORD_PACKAGES,
ConfigDef.Type.STRING,
null,
ConfigDef.Importance.HIGH,
"The packages in which record types annotated with @AvroName, @AvroAlias and @AvroNamespace can be found. Packages are separated by a colon ','."
), props
) {
fun getRecordPackages() = getString(RECORD_PACKAGES)?.split(",")?.map { it.trim() }?.toList() ?: emptyList()
companion object {
const val RECORD_PACKAGES = "record.packages"
}
}