Skip to content

rxHCResponse.asObservable() would't call onNext when work with Vertx.timer #42

@zhangpp520

Description

@zhangpp520

First I defined a Observable

Observable participants(){
return new RxHttpClient(..).request("GET",path,requestBuilder-> {
requestBuilder.end();
}).flatMap(rxHCResponse -> {
return rxHCResponse.asObservable().reduce(new Buffer(), RxSupport.mergeBuffers).map(buffer-> {
//never called !!!!
return new JsonObject(buffer.toString());
});
});
}

then

vertx.setTimer(1000, timerId -> {
participants().subscribe(result-> {
System.out.println(result);
})
});

I found I can't get anything from the Observable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions