confluentinc / schema-registry

Confluent Schema Registry for Kafka
https://docs.confluent.io/current/schema-registry/docs/index.html
Other
2.19k stars 1.11k forks source link

Provide a setter for ObjectMapper #2445

Open shibicr93 opened 1 year ago

shibicr93 commented 1 year ago

Right now, it's really difficult to configure the ObjectMapper as we have only one ObjectMapper instance in the entire application and would like to reuse the same. It would be best if the ObjectMapper is made protected in KafkaJsonDeserializer and KafkaJsonSerializer to be configured in void configure(Map<String, ?> props, boolean isKey) ; or provide a setter.

bmscomp commented 1 year ago

Keeping ObjectMapper immutable is better I think