Serializers and Deserializers

The Schema Repository includes a library for serializing and deserializing messages. A producer application uses a schema to serialize a message for transmission. The consumer application deserializes the incoming message using the schema ID referenced in the message to:

The resulting message content is made available to the consumer.

In the application code, developers reference the Avro serializer for the producer to encode multi-field messages (and possibly also register a schema in the Schema Repository). Developers reference the deserializer to ensure the consumer is using the correct known schema before decoding the message for processing.

Important: The correct and consistent set of serializer/deserializer (SerDes) routines must be used to convert the message data in each direction. This means that both the producer and the consumer and the entire set of messaging applications must use SerDes routines from the same vendor. Any interoperability between different vendors is happenstance and cannot be counted on for continued interoperability.

The Schema Repository supports these primitive types:

Boolean

byte[]

Double

Float

Integer

Long

String

The Schema Repository supports the following Avro logical types:

UUID

Date

TimeMillis

TimeMicros

TimestampMillis

TimestampMicros

LocalTimestampMillis

LocalTimestampMicros

For details on Avro schemas, as well as serializing and deserializing, see the Apache Avro documentation.