繁体   English   中英

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

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

我正在使用Spring Cloud Stream和Confluent Schema Registry注册Avro架构。

模式已成功注册。 但是,当我的流侦听器收到消息时,有效负载仍以字节为单位。

这是我的财产。

 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 

当接收消息我注意到,“convertFromInternal”中的“AbstractAvroMessageConverter”永远不会被调用这是假设解码消息。

您正在使用哪个版本的SCSt? 与1.3上的融合架构注册表服务器集成时,我们修复了几个问题。

另外,您无需设置输入contentType,解析通过包含application/vnd*+avro标头进行,这是转换器启动并从服务器中查找正确架构的提示。 您只需在输出通道上设置该contentType,它就会替换为正确的版本,例如: application/vnd.user.v1+avro

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM