anchor.diff:  
   === Apache Avro Message Converters
   
  -The `spring-cloud-stream-schema` module contains two  types of message converters that can be used for Apache Avro serialization:
  +The `spring-cloud-stream-schema` module contains two types of message converters that can be used for Apache Avro serialization:
   
   *     converters using the class information of the serialized/deserialized objects, or a schema with a location known at startup;
   *     converters using a schema registry - they locate the schemas at runtime, as well as dynamically registering new schemas as domain objects evolve.
  
positive.code: }
  ----
  
  
  
  Spring Cloud Stream provides support for Avro-based converters and schema evolution. See <<schema-evolution>>
  
  === `@StreamListener` and Message Conversion
  
  
negative.code: 
  If you have enabled Avro based schema registry client by setting `spring.cloud.stream.bindings.output.contentType=application/*+avro` you can customize the behavior of the registration with the following properties.
  
  spring.cloud.stream.schema.avro.dynamicSchemaGenerationEnabled:: Enable if you want the converter to use reflection to infer a Schema from a POJO.
  +
  Default:: `false`
  +
  spring.cloud.stream.schema.avro.readerSchema:: Avro compares schema versions by looking at a writer schema (origin payload) and a reader schema (your application payload), check https://avro.apache.org/docs/1.7.6/spec.html[Avro] documentation for more information. If set, this overrides any lookups at the schema server and uses the local schema as the reader schema.
  Default:: `null`
  +
  spring.cloud.stream.schema.avro.schemaLocations:: Register any `.avsc` files listed in this property with the Schema Server.
  +
  Default:: `empty`
  +
  spring.cloud.stream.schema.avro.prefix:: The prefix to be used on the Content-Type header.
  +
  Default:: `vnd`
  
  
  === Schema Registration and Resolution
  
  To better understand how Spring Cloud Stream registers and resolves new schemas, as well as its use of Avro schema comparison features, we will provide two separate subsections below: one for the registration, and one for the resolution of schemas.
  
  ==== Schema Registration Process (Serialization)
  
  The first part of the registration process is extracting a schema from the payload that is being sent over a channel.
  Avro types such as `SpecificRecord` or `GenericRecord` already contain a schema, which can be retrieved immediately from the instance.
  In the case of POJOs a schema will be inferred if the property `spring.cloud.stream.schema.avro.dynamicSchemaGenerationEnabled` is set to `true` (the default).
  
  .Schema Writer Resolution Process
  image::schema_resolution.png[width=300,scaledwidth="75%",align="center"]
  
  Once a schema is obtained, the converter will then load its metadata (version) from the remote server.
  First it queries a local cache, and if not found it then submits the data to the server that will reply with versioning information.
  The converter will always cache the results to avoid the overhead of querying the Schema Server for every new message that needs to be serialized.
  
  .Schema Registration Process
  image::registration.png[width=300,scaledwidth="75%",align="center"]
  
  With the schema version information, the converter sets the `contentType` header of the message to carry the version information such as `application/vnd.user.v1+avro`
  
  ==== Schema Resolution Process (Deserialization)
  
  When reading messages that contain version information (i.e. a `contentType` header with a scheme like above), the converter will query the Schema server to fetch the *writer* schema of the message.
  Once it has found the correct schema of the incoming message, it then retrieves the reader schema and using Avro's schema resolution support reads it into the reader definition (setting defaults and missing properties).
  
  .Schema Reading Resolution Process
  image::schema_reading.png[width=300,scaledwidth="75%",align="center"]
  