I have the next configuration:
Inbound
<int:gateway id="inGateway" service-interface="XXX"
error-channel="errorChannel"
default-request-channel="requestChannel"
default-reply-channel="replyChannel" />
Outbound:
<ws:outbound-gateway id="ws-outbound-gateway"
request-channel="inbound" reply-channel="outbound" uri="XXX" />
Chain 1:
<int:chain input-channel="requestChannel" output-channel="inbound">
XXX </int:chain>
Chain 2:
<int:chain input-channel="outbound" output-channel="replyChannel"> XXX
</int:chain>
Error:
<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());
When the webservice of outbound is down the error go into errorChannel transformer but to reponse we have the next error:
o.s.m.c.GenericMessagingTemplate$TemporaryReplyChannel#242 Reply message received but the receiving thread has exited due to an exception while sending the request message:GenericMessage [payload=[#document: null], headers={spanTraceId=8bf90ea9ff4266c8, spanId=598680bae5f913d5, spanParentSpanId=8bf90ea9ff4266c8, replyChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@76c751de, functionalId=PRUEBASOA12, errorChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@76c751de, messageSent=true, id=2108386f-99db-98b9-3d30-3bcf45335424, spanSampled=1, spanName=message:requestChannel}]
We don't understand... because we have the same flow with
XXXin the chains; you also need to show your service interface. That error implies there is a timeout on the gateway. - Gary Russell