Some peculiarities of Avro that are worth knowing


November 9, 2019

In a previous post we spoke about Avro and how we started to use it together with our REST API based micro services. As it soon turned out, this tool also has some corners and edges, which are advantageous to know. Using the default configuration we found an issue working with Maps used in the generated code.

In regard to this it is important to know that out of the box Avro (we currently use version 1.8.2)

  • uses CharSequence for Strings (apparently to provide backward compatibility)
  • uses Utf8 Classes for string representation internally

This caused some problems for us, e.g. retrieving values by key from Maps did not work in a straight forward way anymore.

We resolved these problems by configuring Avro to use String instead of CharSequence in the configuration of the avro-maven-plugin used in out Maven build.



With the configuration change described above we are now able to use Avro in a way fitting all of our requirements in development.

See also:



Working as a software engineer for many years mostly in the JVM environment. Skilled in Scrum and Agile practices, currently scrum master of