简体   繁体   English

无法使用Confluent Schema Registry和Spring Cloud Streams反序列化Avro消息

[英]Unable to deserialize Avro message using Confluent Schema Registry and Spring Cloud Stream

I am using Spring Cloud Stream and Confluent Schema Registry to register Avro schemas. 我正在使用Spring Cloud Stream和Confluent Schema Registry注册Avro架构。

Schemas are registered successfully. 模式已成功注册。 But when my Stream Listener receives a message the payload is still in Bytes. 但是,当我的流侦听器收到消息时,有效负载仍以字节为单位。

Here are my properties. 这是我的财产。

 spring.cloud.stream.schemaRegistryClient.endpoint=http://localhost:8081 spring.cloud.stream.bindings.output.contentType=application/*+avro spring.cloud.stream.schema.avro.dynamic-schema-generation-enabled=true spring.cloud.stream.schemaRegistryClient.cached=true spring.cloud.stream.schema.avro.schemaLocations=classpath*:schemas/*.avsc spring.cloud.stream.bindings.input.contentType=application/*+avro 

While receiving message I noticed that " convertFromInternal " in " AbstractAvroMessageConverter " never gets invoked which is suppose to decode the message. 当接收消息我注意到,“convertFromInternal”中的“AbstractAvroMessageConverter”永远不会被调用这是假设解码消息。

What version of SCSt are you using? 您正在使用哪个版本的SCSt? We fixed a couple of issues when integrating with confluent schema registry server on 1.3. 与1.3上的融合架构注册表服务器集成时,我们修复了几个问题。

Also, you don't need to set the input contentType, resolution happens via headers that contain application/vnd*+avro that's the hint for the converter to kick in and find the correct schema from the server. 另外,您无需设置输入contentType,解析通过包含application/vnd*+avro标头进行,这是转换器启动并从服务器中查找正确架构的提示。 You only set that contentType on the output channels, it gets replaced with the correct version for example: application/vnd.user.v1+avro 您只需在输出通道上设置该contentType,它就会替换为正确的版本,例如: application/vnd.user.v1+avro

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring / Avro - 使用融合模式注册表 - Spring / Avro - using confluent schema registry 使用默认架构注册表客户端而不是Avro架构注册表客户端的Spring Cloud Stream问题 - Issue with Spring Cloud Stream using the Default Schema Registry client instead of the Avro Schema Registry client Confluent Cloud Schema Registry Unauthorized错误的spring-cloud-stream-binder-kafka配置 - spring-cloud-stream-binder-kafka configuration for Confluent Cloud Schema Registry Unauthorized error Kafka Avro 使用模式注册表将序列化/反序列化为具体类型失败 - Kafka Avro serialize/deserialize into concrete type using schema registry failing 带有 Confluent 的 Spring Cloud Stream Kafka 与带有 Confluent 的 Spring Kafka 产生的消息不同 - Spring Cloud Stream Kafka with Confluent is not producing same message as Spring Kafka with Confluent 如何通过不同的 Confluent Registry 源忽略 Avro 模式? - How to ignore Avro schema by different Confluent Registry source? Spring Cloud Stream Kafka>使用Confluent REST Proxy消费Avro消息 - Spring Cloud Stream Kafka > consuming Avro messages from Confluent REST Proxy 没有融合模式注册表的反序列化:Avro 序列化数据不包含 avro 模式 - Deserialization without confluent schema registry: Avro serialized data doesn't contain avro schema Avro无法使用更新的架构反序列化消息 - Avro fails to deserialize message with updated schema 错误序列化 Avro 消息 - Kafka Schema Registry - Error serializing Avro message - Kafka Schema Registry
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM