Avro

Avro is the default message serialization format used by Kafka. While it is language-neutral, it is best paired with Java and Kafka.

While it is very similar to protobuf and offers many of the same advantages, it also has some unique properties:

  • Schema evolution

    • Reads and writes are tightly coupled with schemas which enables you to have granular control over how message envelopes evolve

  • Dynamic typing

    • Along with static types, it is also possible to include untyped data

Choosing Avro for your message envelope is (probably) a good idea if:

  • You are a Java and/or Kafka shop

  • You are using Confluent's platform

  • You need both static and dynamic types

Cons

  • Avro is not as well supported as Protobuf

  • Need schema to read/write data (might be a PRO in some cases)

Batch has full support for Avro - all fields in an Avro message are indexed and available for search and replay.

Last updated