I'm creating a web service that is a gateway to another web service. I'm using the Spring Integration framework, specifically an Http Inbound Gateway
to accept incoming requests. When the reply-timeout
is triggered, a 200 status code is returned. Ideally I'd like to return a 504 since my web service has not received a timely reply from the other web service I'm communicating with.
<int-http:inbound-gateway request-channel="authorizationRequestsChannel"
reply-channel="myReplyChannel"
path="/endpoint"
reply-timeout="30000"
supported-methods="POST" />
tl;dr
When the reply channel times-out, the inbound-gateway
returns a 200 status code. Is it possible to set the status code to another value?