1
我正在使用Spring Cloud Stream和Confluent Schema Registry来注册Avro模式。无法使用Confluent模式注册表和Spring云流反序列化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.2.2.RELEASE。我需要升级吗? – RSM
从注册表获取模式时存在问题,仅在1.3分支上修复。另一件事是你的制片人是怎样的?尝试删除输入contentType定义,你应该只依靠标题 –
我试着删除contentType的输入,但仍然有相同的问题。我有一些头\t messageChannel.send(MessageBuilder.withPayload(请求) \t \t \t \t .setHeader( “RetryCount重”, “0”) \t \t \t \t .setHeader( “createUserId”,RequestContext.getCurrentContext简单生产().getUserId())) \t \t \t \t .build());预定发布1.3版本吗? – RSM