【发布时间】:2023-01-14 01:11:39
【问题描述】:
尝试使用 replyChannel 为 WebFlux.inboundGateway 发送错误响应,但是没有从 ErrorFlow 发送响应,客户端继续等待响应。请建议。
return IntegrationFlows.from(WebFlux.inboundGateway("/some/uri")
.requestMapping(m -> m.methods(POST))
.requestPayloadType(SomeObject.class)
.replyChannel(webReplyChannel)
.errorChannel(appErrorChannel))
@Bean
public IntegrationFlow appErrorFlow() {
return IntegrationFlows.from(appErrorChannel())
.transform(m -> "Error Response")
.channel(webReplyChannel)
.get();
【问题讨论】: