Hi,
How do I schedule the async get call on couchbase io thread ?
Flowable
.just(routingContext.pathParam("id"))
.observeOn(????????)
.doOnNext(t -> log.info("Getting the main document"))
.flatMap(id -> RxJavaInterop.toV2Flowable(asyncBucket.get("MAINDOCUMENT::" + id + "::V1")))
.observeOn(Schedulers.io())
.doOnNext(t -> log.info("Converting the main document"))
.flatMap(jsonDocument -> Flowable.just(Json.decodeValue(jsonDocument.content().toString(), MainDocument.class).getChildDocumentId()))
.observeOn(???????)
.doOnNext(t -> log.info("Getting the child document"))
.flatMap(id -> RxJavaInterop.toV2Flowable(asyncBucket.get("CHILDDOCUMENT::" + id + "::V1")))
.observeOn(Schedulers.io())
.doOnNext(t -> log.info("Converting the child document"))
.flatMap(jsonDocument -> Flowable.just(Json.decodeValue(jsonDocument.content().removeKey("key_tx").toString(), ChildDocument.class)))
.observeOn(Schedulers.io())
.doOnNext(t -> log.info("Received the final document"))
.singleOrError()
.subscribe(SingleHelper.toObserver(dataHandler));