Uni using withBackoff and until #1427
-
I have a case where I am trying a http call and I want to retry with a delay until a predicate. So I am using something a little like this;
In short I want to wait a certain amount of time before retrying the http call, until a predicate which decide it does not make sense anymore to retry. The above gives me the following error;
I find the error above not exactly clear since I am not using Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Indeed you cannot mix a backoff retry with a custom predicate. One thing you could try is to have a predicate that both evaluates wether to retry or not, and blocks so you can have a hold on the timing aspect. That being said this won't play well with an event-loop, so you'd need to offset that blocking code to an executor with |
Beta Was this translation helpful? Give feedback.
Thank you for your reply. Ultimately I went with something like this, which seem to be eventloop friedly. Does that seem right to you?