Reactive Retry

I’m searching for a way to redo (retry) an observable without entering the mainloop.

simplified example:
image
When the random node produces an even number, an exception is being thrown.(placeholder for something went wrong).

Is there a way to tell the observable to repeat the whole foreach? The trigger to do that in this example would be the Failure IOBox.

i thought retry or backoffandretry could be useful, but couldn’t figure out how.

1 Like

If I understand it correctly, Channels can be modified across threads, so maybe something like this?

image
Reactive Retry 4 Sebl.vl (21.6 KB)

Hi and thanks a lot!

your solution is working, but still touches the mainloop.
i was hoping for a solution that stays completely async.

i modified your patch to somehow achieve this. but still feels hacky and has its downsides.
image
Reactive Retry 6 Sebl.vl (33.1 KB)

Okay, it sounds like you need a while loop in an async task/process.
Does that sound right?

Maybe this?

https://reactivex.io/documentation/operators/retry.html

I read that already, but couldn’t figure out how to use retry.

in the forecast region I cannot do things things like onerror etc.

a solution that repeats/retries (n times) the incoming observable in case of an exception would be ideal IMHO.

that is also a possible solution. plan b for now :)