opened
tkaszuba
username_0
In the `KeyValueSerdeResolver` class the following code exists:

`if (serdeGenericRawClazz.isAssignableFrom(genericRawClazz)) {
  serdeBeans[0] = v;
}`

which means that if a bean is defined in a configuration class that is assignable to the Specific Avro Key class it will override the default Serdes class defined in the app.properties: 

`spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=io.confluent.kafka.streams.serdes.avro.SpecificAvroSerde`

Recently we had the following defined value Serde in a config class. Instead of taking the default key serde this bean was taken, which resulted in many hours of debugging to find out why.

`@Bean
public Serde<SpecificRecordBase> serde() {
    return Serdes.avroValueSerde(url);
}`

In the document section: https://cloud.spring.io/spring-cloud-stream-binder-kafka/spring-cloud-stream-binder-kafka.html#_outbound_serialization

I would add a warning about defining assignable beans in the configuration and how those will be taken instead of the default ones defined in the config file.
Missing documentation on KeyValueSerdeResolver functionality
issue
created
sobychacko
username_1
@username_0 That link you provided above is from an older release. Did you get there through some bookmarks?

Here are the latest [docs](https://cloud.spring.io/spring-cloud-static/spring-cloud-stream-binder-kafka/3.0.6.RELEASE/reference/html/spring-cloud-stream-binder-kafka.html#_record_serialization_and_deserialization) on serialization.

You can navigate to it through the main project page: https://spring.io/projects/spring-cloud-stream#learn

The updates about the `Serde` beans are detailed there. Can you see if that is sufficient for your needs?
If so, let us know and we can polish it further (or you can send a PR). 

Thanks!
comment
closed
tkaszuba
username_0
issue
created
tkaszuba
username_0
Yes, you are right. The documentation in this version seems much better and explains this overloading concept better. The previous doc I got from google. I didn't notice that it was for the previous version. I will close this issue.
comment