Spring integration spring集成:“;“没有可用的输出通道或replyChannel标头”;

Spring integration spring集成:“;“没有可用的输出通道或replyChannel标头”;,spring-integration,Spring Integration,我正在使用以下SI流: <integration:gateway id="notificationGateway" default-request-channel="start" default-reply-channel="end" service-interface="com.supplier.NotificationGateway"/> <integration:channel id="sta

我正在使用以下SI流:

<integration:gateway id="notificationGateway"
             default-request-channel="start" 
             default-reply-channel="end"
             service-interface="com.supplier.NotificationGateway"/>
<integration:channel id="start"/>
<integration:service-activator id="securedFileTransfer" 
                   input-channel="start" 
                   ref="Submitter" 
                   method="submit" 
                   output-channel="end"/>
<integration:publish-subscribe-channel id="end"/>

有什么想法吗?

谢谢这篇文章对我帮助很大。 下面是我用来创建消息头的代码,该消息头从以前的通道消息到新创建的带有有效负载myPayload的消息

createSlotGateway.send(MessageBuilder.withPayload(myPayload).copyHeaders(messagePrev.getHeaders()).build());

你不应该看到,如果这是你的确切配置;如果有人过滤掉replyChannel头,通常会发生这种情况-即使在消息没有replyChannel头的情况下显式地将回复发送到“end”,网关也无法将响应与请求关联起来。使用调试日志运行,您将看到消息流及其回复通道头。谢谢Gary。在阿泰姆的帮助下,我找到了原因。当我将消息对象从一个通道传递到另一个通道时,有一次我从有效负载构建消息,而不复制头,从而重置MessageHeaders.REPLY_通道的值。
createSlotGateway.send(MessageBuilder.withPayload(myPayload).copyHeaders(messagePrev.getHeaders()).build());