These are chat archives for ReactiveX/RxJava

1st
Feb 2017
ViTORossonero
@ViTORossonero
Feb 01 2017 09:55
you can try .take(N) to create Observable that completes from ReplaySubject
although if buffer of ReplaySubject is less than N items and it isn't full - .take(N) will wait till N items is emmited from ReplaySubject
Petar Shomov
@pshomov
Feb 01 2017 11:08
thank you @ViTORossonero. ReplaySubject has .getValues() which gives me back the items it has buffered for replay but unfortunately the time aspect of it is lost which is sort of a problem for any time-related operations in the "new" cold observable
Luciano
@lJoublanc
Feb 01 2017 11:21
@ViTORossonero try observable slidingBuffer (n,1) map ( list => Observable from calculateSomething(list) ) : Observable[ColdObservable[_]]
You may use some of the other slidingBuffer methods if you want it the elements emitted within the last x seconds, rather than a #. See the API doc.