sealed abstract class AvroSettings[F[_]] extends AnyRef
Describes how to create a KafkaAvroDeserializer
and a KafkaAvroSerializer
and which settings
should be used. Settings are tailored for the Confluent Kafka Avro serializers and
deserializers.
Use AvroSettings.apply
to create an instance.
- Source
- AvroSettings.scala
- Alphabetic
- By Inheritance
- AvroSettings
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def createAvroDeserializer(isKey: Boolean): F[(KafkaAvroDeserializer, SchemaRegistryClient)]
Creates a new
KafkaAvroDeserializer
using the settings contained within this AvroSettings instance, and the specifiedisKey
flag, denoting whether a record key or value is being deserialized. - abstract def createAvroSerializer(isKey: Boolean, writerSchema: Option[Schema]): F[(KafkaAvroSerializer, SchemaRegistryClient)]
Creates a new
KafkaAvroSerializer
using the settings contained within this AvroSettings instance, and the specifiedisKey
flag, denoting whether a record key or value is being serialized. - abstract def properties: Map[String, String]
Properties provided when creating a Confluent Kafka Avro serializer or deserializer.
Properties provided when creating a Confluent Kafka Avro serializer or deserializer. Functions in AvroSettings add properties here as necessary.
- abstract def registerSchema[A](subject: String)(implicit codec: Codec[A]): F[Int]
Register a schema for a given
Codec
for some typeA
, or return the existing schema id if it already exists.Register a schema for a given
Codec
for some typeA
, or return the existing schema id if it already exists.- subject
The subject name
- returns
The schema id
- abstract def schemaRegistryClient: F[SchemaRegistryClient]
The
SchemaRegistryClient
to use for the serializers and deserializers created from this AvroSettings. - abstract def withAutoRegisterSchemas(autoRegisterSchemas: Boolean): AvroSettings[F]
Creates a new
AvroSettings
instance with the specified setting for whether serializers should register schemas automatically or not.Creates a new
AvroSettings
instance with the specified setting for whether serializers should register schemas automatically or not.The default value is
true
. - abstract def withCreateAvroDeserializer(createAvroDeserializerWith: (F[SchemaRegistryClient], Boolean, Map[String, String]) => F[(KafkaAvroDeserializer, SchemaRegistryClient)]): AvroSettings[F]
Creates a new AvroSettings instance with the specified function for creating
KafkaAvroDeserializer
s from settings.Creates a new AvroSettings instance with the specified function for creating
KafkaAvroDeserializer
s from settings. The arguments are schemaRegistryClient,isKey
, and properties. - abstract def withCreateAvroSerializer(createAvroSerializerWith: (F[SchemaRegistryClient], Boolean, Option[Schema], Map[String, String]) => F[(KafkaAvroSerializer, SchemaRegistryClient)]): AvroSettings[F]
Creates a new AvroSettings instance with the specified function for creating
KafkaAvroSerializer
s from settings.Creates a new AvroSettings instance with the specified function for creating
KafkaAvroSerializer
s from settings. The arguments are schemaRegistryClient,isKey
, and properties. - abstract def withKeySubjectNameStrategy(keySubjectNameStrategy: String): AvroSettings[F]
Creates a new
AvroSettings
instance with the specified key subject name strategy.Creates a new
AvroSettings
instance with the specified key subject name strategy. This is the class name of the strategy which should be used.The default value is
io.confluent.kafka.serializers.subject.TopicNameStrategy
. - abstract def withProperties(properties: Map[String, String]): AvroSettings[F]
Creates a new AvroSettings instance including properties with the specified keys and values.
- abstract def withProperties(properties: (String, String)*): AvroSettings[F]
Creates a new AvroSettings instance including properties with the specified keys and values.
- abstract def withProperty(key: String, value: String): AvroSettings[F]
Creates a new AvroSettings instance including a property with the specified key and value.
- abstract def withRegisterSchema(registerSchemaWith: (F[SchemaRegistryClient], String, Codec[_]) => F[Int]): AvroSettings[F]
Creates a new AvroSettings instance with the specified function for registering schemas from settings.
Creates a new AvroSettings instance with the specified function for registering schemas from settings. The arguments are schemaRegistryClient,
subject
, andcodec
. - abstract def withValueSubjectNameStrategy(valueSubjectNameStrategy: String): AvroSettings[F]
Creates a new
AvroSettings
instance with the specified value subject name strategy.Creates a new
AvroSettings
instance with the specified value subject name strategy. This is the class name of the strategy which should be used.The default value is
io.confluent.kafka.serializers.subject.TopicNameStrategy
.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- final def createAvroSerializer(isKey: Boolean): F[(KafkaAvroSerializer, SchemaRegistryClient)]
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.0-M3) use the overload that takes an optional writer schema
- final def withCreateAvroSerializer(createAvroSerializerWith: (F[SchemaRegistryClient], Boolean, Map[String, String]) => F[(KafkaAvroSerializer, SchemaRegistryClient)]): AvroSettings[F]
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.0-M3) use the overload that has an
Option[Schema]
argument