hw-kafka-avro-4.0.1: Avro support for Kafka infrastructure

Safe HaskellNone
LanguageHaskell2010

Kafka.Avro.Encode

Synopsis

Documentation

encodeKey :: (MonadIO m, ToAvro a) => SchemaRegistry -> Subject -> a -> m (Either EncodeError ByteString) Source #

Encodes a provided value as a message key.

Registers the schema in SchemaRegistry with "subject-key" subject.

encodeValue :: (MonadIO m, ToAvro a) => SchemaRegistry -> Subject -> a -> m (Either EncodeError ByteString) Source #

Encodes a provided value as a message value.

Registers the schema in SchemaRegistry with "subject-value" subject.

encodeWithSchema :: (MonadIO m, ToAvro a) => SchemaRegistry -> Subject -> a -> m (Either EncodeError ByteString) Source #

Encodes a provided value into Avro and registers value's schema in SchemaRegistry.