【发布时间】:2021-01-31 17:41:08
【问题描述】:
Spring Integration 5.3.2 的一个非常简单的示例:单个集成流,使用带有 IntegrationFlowContext 的 spring-integration DSL 注册:
`
MessageChannel startChannel = MessageChannels.direct("channel").get();
StandardIntegrationFlow flow = IntegrationFlows.from(startChannel)
.log().get();
flowContext.registration(flow)
.autoStartup(false)
.register();
flow.start();
startChannel.send(MessageBuilder.withPayload("test").build());`
产量org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for channel。
为什么?添加单个.transform(e->e)(例如)可以解决问题,但显然是一种奇怪的解决方法。
【问题讨论】: