春季集成:“没有可用的输出通道或replyChannel标头”

Ass*_*ato 4 spring-integration

我正在使用以下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"/>
Run Code Online (Sandbox Code Playgroud)

出现以下错误:

no output-channel or replyChannel header available?borg.springframework.integration.support.channel.ChannelResolutionException: no output-channel or replyChannel header available
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

小智 5

谢谢这篇文章对我有很大帮助。波纹管是我用来从上一个频道消息创建消息头的代码,再到带有有效负载myPayload的新创建消息的代码

createSlotGateway.send(MessageBuilder.withPayload(myPayload).copyHeaders(messagePrev.getHeaders()).build());
Run Code Online (Sandbox Code Playgroud)