kafka-proto-serde / com.fleshgrinder.kotlin.kafka

Package com.fleshgrinder.kotlin.kafka

Types

BaseSerde

abstract class BaseSerde<T> : Serde<T>, Serializer<T>, Deserializer<T>

BaseSerde combines Serde, Serializer, and Deserializer into a single unit and fixes type information for Kotlin. One should not program against this directly, however, it is a convenient basis for writing Kafka Serdes for other types that you might require in your code base.

NativeSerde

class NativeSerde<T> : BaseSerde<T>

NativeSerde decorates Kafka Serdes and allows direct access to its Serializer and Deserializer functions.

ProtoSerde

class ProtoSerde<T> : BaseSerde<T>

The ProtoSerde class is a Kafka Serde/Serializer/Deserializer for Proto, version 2 and 3, objects.

Type Aliases

Proto

typealias Proto = Message

Proto is a more descriptive type alias for the very generic Message interface from Protobuf. It is also how most people address Protobuf in their conversational language, hence, it aligns the code with that.

Extensions for External Classes

com.google.protobuf.Message

Functions

serde

fun <T> serde(): BaseSerde<T>

Construct new Serde/Serializer/Deserializer for T.