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

Safe HaskellNone
LanguageHaskell2010

Kafka.Avro.Decode

Synopsis

Documentation

decode :: forall a m. (MonadIO m, HasAvroSchema a, FromAvro a) => SchemaRegistry -> ByteString -> m (Either DecodeError a) Source #

Decodes a provided Avro-encoded value. The serialised value is expected to be in a "confluent-compatible" format where the "real" value bytestring is prepended with extra 5 bytes: a "magic" byte and 4 bytes representing the schema ID.