【发布时间】:2018-08-22 15:36:42
【问题描述】:
我的用例是这样的。我想定期轮询休息服务,并且 使用该信息调用另一个休息服务。我的 DSL 如下所示
public IntegrationFlow flow() {
return IntegrationFlows
.from(() -> "messageSource", c -> c.poller(Pollers.fixedRate(5000).maxMessagesPerPoll(1)))
.handle(Http.outboundChannelAdapter("firstRestServiceUrl"))
.handle(Http.outboundChannelAdapter("secondRestServiceUrl")).get();
}
我的问题是第一个处理方法会在回复通道上回复,并且消息不会进一步传递到第二个处理程序。
还是我的理解有误?应该使用一个转换器来调用 firstRestServiceUrl 而不是 handle 方法?
我从文档中的理解是句柄相当于一个服务激活器,我应该能够将输出通道设置为我的第二个服务激活器的输入!!
【问题讨论】:
标签: spring-integration spring-integration-dsl