【发布时间】:2018-03-16 12:24:10
【问题描述】:
我正在使用 Spring Cloud Stream Reactive 并且遇到了问题。
考虑以下代码:
@InboundChannelAdapter("list", poller = [(Poller(fixedDelay = "\${thetis.listInterval:60000}"))])
fun timerMessageSource(): Flux<Center> = config.centers.toFlux()
我的目标是生成一种通量,该通量应被以下形式的某种东西消耗:
@StreamListener("list") @Output("download")
fun processList(center: Center): Flux<Product> = ...
但这似乎不起作用。通道适配器正确生成通量,但它显示以下内容:
org.springframework.messaging.converter.MessageConversionException: Could not read JSON: Unrecognized token 'FluxIterable': was expecting ('true', 'false' or 'null')
我想我应该在入站通道适配器上添加一个StreamEmitter 注释,但这似乎不起作用。
实现这种流程的正确方法是什么?
谢谢你和问候,
费尔南多
【问题讨论】:
标签: kotlin spring-integration spring-cloud-stream reactive