I got two questions here.
- In what condition onComplete() will be called?
Disposable t = res.subscribeWith(new DisposableSubscriber<CompletionStreamResponse>(){
@Override
public void onNext(CompletionStreamResponse completionStreamResponse) {
completionStreamResponse.getCompletions()
.forEach(completion -> {
//do something here.
});
}
@Override
public void onError(Throwable throwable) {
// do something here
}
@Override
public void onComplete() {
}
});
- If a caller starts to stream the completions from an offset, the completion stream will be hanging there waiting after all the results been streamed out. Is there any way to find out it has reached the end of the ledger and stop it?