Questions tagged [rx-java3]
149 questions
0
votes
2 answers
Observable that stores last value, but cannot push new ones?
Let's say I have an Person interface, that have an name observable:
interface Person {
Observable name;
}
And it's implementation:
class David implements Person {
Observable name =…

Gieted
- 835
- 6
- 21
0
votes
1 answer
rxjava - items not emitted by sequentially
in below code lines
@Test
fun rx() {
val items = Observable.just(1, 2, 3, 4, 5)
.observeOn(Schedulers.io()) //<---- if remove this line each item is emitted by sequentially (i.e 12345)
items
.filter { it == 1 }
…

J.ty
- 337
- 1
- 3
- 18
0
votes
1 answer
After added SubscribeOn and ObserveOn in stream method chaining not getting trigger
I am using rxjava3 and not quite understanding why method are not getting called in stream after added ObserveOn and SubscribeOn.
Here is the example java code:
package mytestapp.error;
import io.reactivex.rxjava3.annotations.NonNull;
import…

cj devin
- 1,045
- 3
- 13
- 48
0
votes
2 answers
the right way to return a Single from a CompletionStage
I'm playing around with reactive flows using RxJava2, Micronaut and Cassandra. I'm new to rxjava and not sure what is the correct way to return a of List Person in the best async manner?
data is coming from a Cassandra Dao interface
public interface…

knoma
- 75
- 1
- 7
0
votes
0 answers
RxJava Junit4 multiple observable test
First time testing Rx, so please give some advice.
Need to test observable chain in model that gives as a result 21 data objects:
public Observable exec(int inputNumber) {
return…

white-imp
- 313
- 2
- 16
0
votes
0 answers
Flowable ignores Subscription.request when groupBy operator is used
I'm new to RxJava, so would be great if someone could clarify this...
Consider the following flow:
Generate/emit an Integer each time a value is requested by a subscriber.
Group generated integers so that each value constitutes its own group. Note:…

Alexander
- 131
- 4
0
votes
0 answers
RxJava PublishSubject subscribe doesn't give anything. Something's wtong with subscription?
Learning RxJava so will be appreciate for any advice.
Need to receive objects when calculation is ready, so I made PublishSubject in models method:
public PublishSubject exec(int inputNumber) {
if (unitList.size() > 0) {
for…

white-imp
- 313
- 2
- 16
0
votes
2 answers
Subscribing to consumer in rxjava?
I replaced the action call to Consumer in my code but while subscribing it keeps asking me to cast it to observer
Below is the code
public void fetchSubscriptionPlans(String url, String apiKey, String authToken,
…

WISHY
- 11,067
- 25
- 105
- 197
0
votes
0 answers
No static method fromRunnable when running tests in Firebase Test Lab
Recently, our project was migrated to RxJava 3 from RxJava 2. When we run our tests in Firebase Test Lab, we see the app crashing during testing:
java.lang.NoSuchMethodError: No static method…

Jawnnypoo
- 993
- 12
- 18
0
votes
1 answer
Cancellation across the Flowables when implementing branching logic
I have some Flowables composed using FlowableTransformer like this:
public static FlowableTransformer transformer() {
return f -> {
return Flowable.mergeArray(5, 5, f.filter(...).map(...), f.filter(...).map(...));
}
}
The…

Dan Gravell
- 7,855
- 7
- 41
- 64
0
votes
2 answers
RxJava, wait for multiple Observables to provide desired result in the same time
I have multiple Observable delivering data from "alert sensors". They are delivering only value changes. How to wait until all of them switch to false which would indicate there is no alert anymore?

morisil
- 1,345
- 8
- 19
0
votes
0 answers
RxJava disposing Observable/Flowable in a microservice Server project
I am using RxJava for a server microservice project, where using Jetty as HTTP Servlet server.
I am handling requests either from client or main server with Observable for different flows.
When a request hitting the api below, I will return a…

Daayoung Code
- 1
- 2
0
votes
1 answer
RXJava Sequentially execute observable
I have multiple functions that return an Observable. Each function execute command on the file system. I need to execute each function one after another and get the output of the function in the observable. At the end i want a single…

Scandinave
- 1,388
- 1
- 17
- 41
-1
votes
1 answer
RxJava Run A Task on another thread
I'm using RxJava3 Observers and Observables. But i have a problem.
I have attached a screenshot below, please see the Toast on the bottom. I used Thread.currentThread().toString() And i got the Main, 5, Main output
Now, here's my observable…