首页 文章

Spring集成 . 出站异常时的网关回复错误

提问于
浏览
0

我有下一个配置:

入站

<int:gateway id="inGateway" service-interface="XXX"  
    error-channel="errorChannel" 
    default-request-channel="requestChannel" 
    default-reply-channel="replyChannel" />

出站:

<ws:outbound-gateway id="ws-outbound-gateway"
request-channel="inbound" reply-channel="outbound"      uri="XXX" />

链1:

<int:chain input-channel="requestChannel" output-channel="inbound">
XXX </int:chain>

链2:

<int:chain input-channel="outbound" output-channel="replyChannel"> XXX
</int:chain>

错误:

<int:chain input-channel="errorChannel" output-channel="replyChannel">

        <int:transformer ref="logicTransformers" method="errorTransformerMethod"></int:transformer>


    </int:chain>
</beans>

Java Transformer:

final GenericError errorCatalog = errorCatalog(errorMessage);
LOGGER.warn("Transformed error from catalog: {}", errorCatalog);
final MessageBuilder<Document> builder =
MessageBuilder.withPayload(XmlUtil.parseToDocument(errorCatalog)).copyHeaders(errorMessage.getHeaders()).copyHeadersIfAbsent(errorMessage.getHeaders());

当出站的web服务停止时,错误进入errorChannel转换器,但要响应,我们有下一个错误:

osmcGenericMessagingTemplate $ TemporaryReplyChannel#242收到回复消息但接收线程在发送请求消息时因异常而退出:GenericMessage [payload = [#document:null],headers = {spanTraceId = 8bf90ea9ff4266c8,spanId = 598680bae5f913d5,spanParentSpanId = 8bf90ea9ff4266c8,replyChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@76c751de,functionalId = PRUEBASOA12,errorChannel = land.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@76c751de,messageSent = true,id = 2108386f-99db-98b9- 3d30-3bcf45335424,spanSampled = 1,spanName = message:requestChannel}]

我们不明白......因为我们有相同的流程

1 回答

相关问题