Questions tagged [reactivex]

ReactiveX is a library for composing asynchronous and event-based programs by using observable sequences.

From reactivex.io:

It extends the observer pattern to support sequences of data and/or events and adds operators that allow you to compose sequences together declaratively while abstracting away concerns about things like low-level threading, synchronization, thread-safety, concurrent data structures, and non-blocking I/O.

688 questions
0
votes
1 answer

How can I extract values from an Rx Observable?

I am attempting to integrate some ReactiveX concepts into an existing project, thinking it might be good practice and a way to make certain tasks cleaner. I open a file, create an Observable from its lines, then do some filtering until I get just…
Eric
  • 2,300
  • 3
  • 22
  • 29
0
votes
1 answer

Getting the initial emission of an Observable later in its tree

Given a hot Observable myObservable which emit values at irregular intervals. I would like to be able to flatMap an obs1 Observable and depending on the result of obs1 I want to flatMap an obs2 with the initial myObservable value. As an…
E-Kami
  • 2,529
  • 5
  • 30
  • 50
0
votes
2 answers

Rxjava : Apply treatment on members of an object

I hava a function which is returning an object containing a list from a html page : @Override public Observable getMediaListFromUrl(String url) { return getHtml(url) .map(new Func1() { …
Nicolas
  • 598
  • 3
  • 15
0
votes
3 answers

Observable in angular 2, data is not logging to the console

The following code is not logging the data to the console windows nor it's throwing any exceptions and Transpiler is also not showing any errors, I'm working on angular 2.0.0-beta.7 I've been looking to resolve this issue since 4 hours but couldn't…
0
votes
0 answers

RxJava re-create observable onError

So I have my form model which holds all data I want to validate and then send to the server. Let's keep it as simple as possible - isFormValid or api request should return Observable.errr(throwable) which should call onError() in the…
aldorain
  • 790
  • 5
  • 16
0
votes
2 answers

Can I generate a sequence of Rx Observables from chained AJAX calls?

Technical Context I am using jQuery in a web browser to call an API that returns a set of entries from a log. API requests take two parameters: offset_timestamp: an integer specifying the earliest possible entry I want limit: an integer specifying…
Miles
  • 23
  • 5
0
votes
1 answer

Rx java OutOfMemory

EDITED: see this question which is more clear and precise: RxJava flatMap and backpressure strange behavior I'm currently writing a data synchronization job with RxJava and I'm quite novice with reactive programming and especialy RxJava library. My…
benjamin.donze
  • 446
  • 3
  • 19
0
votes
1 answer

Concept of array in Reactivex

Hi I'm starting to use ReactiveX c#, all sounds good, except for a concept. I dunno how to make a reactive array ( or collection or list) I'd like to have something like ObservableCollection, but with concept of reactive. I would mean that no one of…
LXG
  • 1,957
  • 3
  • 22
  • 45
0
votes
2 answers

RxJS 5 subclassing Observable - static methods return instances of the parent class

I'm trying to subclass the RxJS Observable class as described here by subclassing Observable and overriding the lift method. This works for any operators I add to the prototype, but whenever I try to instantiate a new Observable of my subclass…
Niklas Fasching
  • 1,326
  • 11
  • 15
0
votes
1 answer

Observables executed in parallel

I was doing some experiments with reactiveX Zip, and I notice that the observables that I define inside my zip are executed sequentially one after the other. I thought that the good thing of the zip was that every single observable defined inside…
paul
  • 12,873
  • 23
  • 91
  • 153
0
votes
1 answer

vertx httpserver wait for port listening

I´m having an issue with a RC running my server. My integration test are hitting the server before this one startup. How can I ensure that the port of the server is actually listening before I start my test?. I was using httpServer.listen(port,…
paul
  • 12,873
  • 23
  • 91
  • 153
0
votes
1 answer

Cancel a task in reactivex.net

Assumed that I have existed code like: public IEnumerable GetAllData(string[] ids) { foreach(var id in ids) { //this is a time-consuming operation, like query from database var data = this.repo.Find(id); yield…
Narcotics
  • 313
  • 1
  • 8
0
votes
1 answer

Can't print items of the observables after grouped

Can't understand why the following rxscala code is not working as expected: import rx.lang.scala.Observable object MyTest extends App { case class ProjectEvent(projectName: String, description: String) val projectEvents:…
Freewind
  • 193,756
  • 157
  • 432
  • 708
0
votes
1 answer

`delay` on `interval` will throw `NoSuchElementException`?

Some simple rxscala code: val s = Observable.interval(Duration("100 millis")) .zip(Seq(1, 2, 3)).map(_._2).delay(Duration("2 s")) println(s.toBlocking.toList) When run it, it throws exception: Exception in thread "main"…
Freewind
  • 193,756
  • 157
  • 432
  • 708
0
votes
0 answers

How to get historical data from a PublishSubject?

How to get all historical data from a PublishSubject? val ob = PublishSubject[Int]() ob.subscribe(x => println("a: " + x)) ob.onNext(1) ob.subscribe(x => println("b: " + x)) ob.onNext(2) It prints: a: 1 a: 2 b: 2 You can see there is no b: 1…
Freewind
  • 193,756
  • 157
  • 432
  • 708
1 2 3
45
46