Search code examples
javaspring-bootjsonschemaspring-cloud-streamconfluent-schema-registry

Json schema registry spring cloud kafka


i work with spring cloud stream kafka , i have an issue with with json schema registry , i save my schema with the api of confluent but always i had this problem

org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.cloud.stream.binder.kafka.KafkaMessageChannelBinder$ProducerConfigurationMessageHandler@65ffd83e]; nested exception is org.apache.kafka.common.errors.SerializationException: Error retrieving JSON schema: {"$schema":"http://json-schema.org/draft-07/schema#"

Ps: the schema used is too long

What might the problem be?


Solution

  • I resolved the problem: I just add use.latest.version: true to get the schema from the server of schema registry.

    Without this option Spring will not get the actual version of the schema.