I'm making integration with a web service. There is an api post method that can return a "good" response with a body like:
{
"result": "Ok"
}
or if something bad happens it returns this:
{
"result": "Failure"
}
I need to retry the POS request until i get a good answer. Could anyone advice some technique to deal with this?
There are few more retry cases that depend on other response field values, but i think that the result
property example shows the problem.
It seems, that using RetryTemplate
would fit, but i'm not sure how to handle ths case with RetryState
. Any suggestions?