i'm currently trying to poll multiple endpoints (which are different) the problem is i want to keep polling only the endpoints which didn't return the status i need in an aggregated manner so the flow is basically :
build the requests -> merge them to one stream -> poll for response -> check is status matches :
- if doesn't wait and redo the flow
- if does take the observer out of the stream
this is what i have written and it feels like i'm missing something
Observable.merge(buildRequests())
.repeatWhen(obs -> obs.delay(5000, TimeUnit.MILLISECONDS))
.takeUntil(response -> CheckShouldRepeat(response)).subscribe(whatever());
thanks a bunch!