RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
<T> Flowable whenAll(List<Single<T>> singles) {
return Single.concat(singles);
}
.errorStrategyContinue
, but you may join the discussion and propose and additional resume operator with fallback -> reactor/reactor-core#629
Another question. Is there any operator is equivalent andThen
for Completable
in Observable
? For example i use this really often
API.login
.doOnNext(//save the login datas)
.ignoreElements()
.andThen(//other observable Calls)
I think concatWith is somehow the good one but it need downstream be the same type.
just
. Since these come through onNext
, there is guarantted to be one producer of them. The drain will then read from this SPSC queue and the queues of the inner Subscriber
s from a guaranteed single thread at a time.
Ah gotcha! So the main queue is only responsible for scalars from the following line:
if (t instanceof ScalarSynchronousObservable) {
tryEmit(((ScalarSynchronousObservable<? extends T>)t).get());
}
Each inner will have its own queue and not use the main. @akarnokd ?
flatDir
, I can't seem to use the Java 9 part.
Hi,
Was wondering if the community could help me on how I could parallelize the 3 calls shown in the code below?
Observable<CheckoutDetailsDTO> o = Observable.zip(
orderIntegrationService.getRxOrderByOrderId(orderId),
shippingIntegrationService.getRxAddressListForUser(),
paymentIntegrationService.getRxPaymentInfoForUser(),
(order, addresslist, paymntinfo) -> new CheckoutDetailsDTO(order, addresslist, paymntinfo));
The calls to order, shipping and payment happen to be called one after another in the code above, is there any way it can be parallelized as the 3 calls are independent of each other ?
orderIntegrationService.getRxOrderByOrderId(orderId).subscribeOn(Schedulers.io()),
shippingIntegrationService.getRxAddressListForUser().subscribeOn(Schedulers.io()),
paymentIntegrationService.getRxPaymentInfoForUser().subscribeOn(Schedulers.io()),
BehaviorSubject
that emits strings every time a barcode is scanned, i then want to try map this to a product in my room database. i also want to know if it failed to map so i cannot useObservable
as 'empty' values are filtered out so i changed the sig to use Maybe<T>
. Is there anything special i need to do to flatmap from my Observable
to the Maybe
?
Hi, I am working on a project using Hystrix and gRPC. I have a HystrixObservableCommand class - MemberCommand and I am subscribing using Schedulers.io()
memberCommand.toObservable().subscribeOn(Schedulers.io());
In the construct
method, I log the gRPC context but it returns null -
protected Observable<Greeter.GreeterReply> construct() {
logger.info("0 -- In MemberCommand, traceId from gRPC context = {}", ContextKeys.TRACE_ID_CTX_KEY.get());
Any ideas, how I can propagate gRPC context through RxIoScheduler threads?
0 -- In MemberCommand, traceId from gRPC context = null