spring-integratiopn Retry on timeout in a long process gateway

Viewed 56
1 Answers

Well, let's consider we don't know what is behind that long process. Only what we know that we send request and wait for reply. When we timeout on the service call, there is no guarantee how the server is going to work: maybe it will store reply for the next idempotent call, maybe it just discard everything and forget. Or reply maybe lost on the wire meanwhile we are timeouting...

That's why we fully don't consider the reply as independent entity, but just like a part of the whole request-reply action.

Therefore, if we fail during timeout, there is no any other way unless retry the request one more time and try to wait for the reply again. That is already server responsibility to react properly to the same request.

Let me know if you have any valuable thought on the matter!

Related