-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rxHCResponse.asObservable() would't call onNext when work with Vertx.timer #42
Comments
Hi, is the problem specific to calling it would be really helpful if you had a minimal test that reproduced the issue? Thanks, |
The command is 'vertx run Test.java -includes io.vertx |
And I find when I post data,there is a strange program. |
I think it's same as the #5。If I wrap the Observable into Func,it works well. |
Hi @zhangpp520, right - it is the same issue as #5, so there are two options
Since it's a legacy library I'd suggest that 2(ii) is safer and hopefully the correct semantics can be implemented from the start in Vert.x 3 -Peter |
Thank you so much,Peter!
If a Maybe I can add an Thank you! |
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.
The text was updated successfully, but these errors were encountered: