API Reference

class sprockets.mixins.avro.Decoder

Mix this in over a rejected Consumer for avro deserialization.

This mix-in implements the body property that will automatically deserialize avro datum values using a provided schema. You are required to implement the get_avro_schema() method so that it returns the appropriate avro.schema.Schema instance for this message type.

See also: rejected.consumer.Consumer and rejected.consumer.SmartConsumer

body

Return the fully deserialized message body.

get_avro_schema()

Return the avro schema to use for this message.

Returns:the avro schema instance appropriate to this message
Return type:avro.schema.Schema