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