Questions tagged [rx-java]
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
rx-java
6,966
questions
0
votes
0
answers
7
views
Modifying object outside RxJava stream
Is it correct to modify object inside reactive flow, when it was defined outside of it?
Example:
public Single<MyDto> createDto() {
MyDto dto = new MyDto();
return Single.just(“...
0
votes
0
answers
42
views
"Too long maps chain. May cause performance overhead"
Idea flags code usage that has more than 2 maps:
single
.map(...)
.map(...)
.map(...)
There is no other explanation for it and I couldn't find any documentation except for this https://...
1
vote
2
answers
49
views
How to call suspend fun in async way from flow scope?
So I have never done something like this, so I have no clue which is the better approach.
Right now, I have a useCase, which returns with a flow. To keep it simple, I don't attach my code, but it is ...
0
votes
0
answers
28
views
Getting issue in parallel execution of rxjava async calls in java implementaion
I am new to reactive prorgramming in java using rxjava.
I have an implementation in java in which I am making an async call to an external service. Based on the response of this i am calling another ...
0
votes
0
answers
8
views
JavaRX buffering from many kafka topics and fault tolerancy
I am consuming from couple of kafka topics within JavaRX. I have groupping per key + 3s buffer window. I dont know how to 'not' commit message which is inside buffer window process and another message ...
0
votes
1
answer
25
views
Getting Compilation Failure "cannot find symbol for concatMap" in the RxJava Code
I am new to this RxJava coding language.
I am trying to write a function that recursively copies files from one S3 location and pastes the content to another S3 location.
Here is the code that I have ...
0
votes
0
answers
31
views
RxJava Scheduler scheduleDirect guarantees
If I have some code like the following:
Schedulers.single().scheduleDirect {
Schedulers.single().scheduleDirect {
println("Run inner code") // Line A
}
println("...
2
votes
0
answers
27
views
Where do I put the Disposable for RxJava?
I'm using RxJava2 and subscribing to my data streams with a CompositeDisposable variable. I'm familiar with codebases having the disposable in the Fragment/Activity, but I'm not entirely sure why that ...
0
votes
0
answers
55
views
How to implement first run preferences using Preferences Datastore in Java?
I'm currently working on an Android application using Java and following the MVVM architecture pattern. In my application, I need to save a boolean value to determine if the app has been opened for ...
-1
votes
1
answer
30
views
RxJava timeout conditionally
RxJava observable need to apply the timeout based on some condition. If the condition is false, it should not apply any timeout.
Observable<String> obs2 = Observable
.fromCallable(...
1
vote
1
answer
45
views
RxJava PublishSubject buffer elements with timeout
I want to achieve the following with RxJava:
Buffer elements and publish them when 5 seconds passed after the last element
Publish buffered elements in 20 seconds passed after the first element
...
0
votes
2
answers
79
views
Android Rx: Conditioned timer of emitter
I have BehaviorSubject<Boolean> and I wonder how to get the following behaviour:
When comes False it should wait for 10 sec before emit the value
When comes True it emits the value immediately, ...
0
votes
0
answers
41
views
How to work with youtube dl android library
here is the link to my gist https://gist.github.com/tomleejumah/d11d1996bce8957c140c90e7856e01eb
I do have a bug in fetching whereby it doesnt fetch
Im requesting help in debugging
0
votes
1
answer
21
views
adjust delay value in rx java from source
I'm new to Rxjava and could not find an example or appropriate usage of single.delay() that uses the result of the previous flatmap as the delay. My aim is to use the result of functionOne() to set ...
0
votes
0
answers
74
views
How to cleanup an Observable.take(1) properly?
I have here an Observable, inwhich I combine two observables:
someOtherObservable
.switchMap {
Observables
.combineLatest(
RestClient
....