I have http outbound gateway that post json message to rest service, now the rest will response with http error status with json message type in case if there is any error which should captured by our application. in happy scenario which post json message to that rest service and got http success status and json message also should captured with our application.
Now what I achieved through spring integration I was able to send message and got success response and capture it but in error status the spring behavior it throw an exception how can I change the behavior?
also how can make retry if there is any timeout ?
below the http outbound gateway configuration
<int-http:outbound-gateway request-channel="aggregatorChannel" reply-channel="responseChannel" charset="UTF-8"
url="http://localhost:8090/receiveGateway" http-method="POST" reply-timeout="180000">
<int-http:request-handler-advice-chain >
<int:retry-advice max-attempts="5" recovery-channel="aggregatorChannel" >
<int:exponential-back-off initial="1000" multiplier="5.0" maximum="600000" />
</int:retry-advice>
</int-http:request-handler-advice-chain>
</int-http:outbound-gateway>
the above configuration will retry on the error message which I don't want retry on that, I want to retry if there is only timeout.