Serhad Burakan Serhad Burakan - 10 months ago 114
reST (reStructuredText) Question

Rest Service with Java Observable from Executer Service

I have a rest web service which returns DeferredResults. I implemented JavaRx Observable from executer service that returns Future. I wanted this web service to be non blocking but it seems it is blocking the operation.

Do you think the way I used executer service is healthy?

DeferredResult result = new DeferredResult();
Observable<ResultEntity> observable = Observable
observable.subscribe(new Subscriber<ResultEntity>() {
public void onCompleted() {


public void onError(Throwable throwable) {

public void onNext(ResultEntity r) {




Observable.from(Future) is blocking operation, as mentioned in documentation. You should use Observable.from(Future,Scheduler) instead.