KafkaAvroSerializer add a configured flag
It would be useful fo have a configured boolean flag on KafkaAvroSerializer to indicate that the call to configure() has already been made. This would be useful to check before you call it again and result in values being overwritten.
Agree. For more context, we encountered this when passing pre-configured KafkaAvroSerializer into DefaultKafkaProducerFactory in spring-kafka. We do this to reuse the configured serde for Kafka Streams in vanilla Kafka context.
Due to the change brought by https://github.com/spring-projects/spring-kafka/issues/1879, configure() will actually be called twice and will complain about missing schema registry url etc., if we only configure these in serde / serializer level.
Similar to how their JsonSerializer guard against this with a configured flag, KafkaAvroSerializer should also do the same.