Why am I getting an exception when I try to use Avro as my serialization format?

A community member was working on a POC for timeseries data ingestion with Kafka, Flink, Druid, and serializing with Avro. The community member encountered this exception:

2022-02-12T02:38:23,923 ERROR [task-runner-0-priority-0] org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner - Encountered exception while running task.
org.apache.druid.java.util.common.parsers.ParseException: Fail to decode avro message!
        at org.apache.druid.data.input.avro.InlineSchemaAvroBytesDecoder.parse(InlineSchemaAvroBytesDecoder.java:99) ~[?:?]
        at org.apache.druid.data.input.avro.AvroStreamReader.intermediateRowIterator(AvroStreamReader.java:69) ~[?:?]

The solution was to explicitly declare the correct version of Avro. Here’s a bit of context and discussion.