Add an avro plugin and refactor the code so that the avro example depends on the plugin and has only minimal code.