reactive-programming Questions

1

There is a concept of actor in Kotlin coroutines library: fun CoroutineScope.counterActor() = actor<CounterMsg> { var counter = 0 // actor state for (msg in channel) { // iterate over inco...
Pentadactyl asked 18/6, 2019 at 8:34

1

Solved

What is the difference between using RxSwift's MainSchedule.instance and MainSchedule.asyncInstance within the context of observeOn?
Unthrone asked 11/10, 2019 at 0:7

1

Solved

I have a service that streams data to a second service that receives stream of objects and saves them to my MongoDB. inside my subscribe function on the Flux object that I get from the streaming s...

1

Solved

How to add BlockHound to spring boot app to detect blocking calls ? I didn't find any examples for spring boot apps: https://github.com/reactor/BlockHound/blob/master/docs/quick_start.md Any hel...
Onestep asked 19/9, 2019 at 14:51

3

Solved

I'm building an RxJS slideshow where, if user holds the right arrow key, I want to navigate to the next tile at every 500 ms. I'm using throttleTime like below: const forwardNavigation$ = fromEven...
District asked 17/9, 2019 at 5:18

1

Solved

I need my endpoint to return data in follow json format: { "code": "SUCCESS", "message": "SUCCESS", "errors": null, "data": [] } Here is my controller code: @GetMapping(value = "/productSub...
Chancey asked 1/9, 2019 at 6:16

3

Solved

Is it possible to have a reactive window width where a variable or data property tracks a window resize e.g computed:{ smallScreen(){ if(window.innerWidth < 720){ this.$set(this.screen_size...
Grummet asked 27/7, 2018 at 20:45

1

Solved

I was looking through the interfaces of observables and saw you can pass anything that implements PartialObserver to the subscribe function. So I did that with BehaviorSubject. Like this (A) sour...
Jaquenette asked 14/8, 2019 at 17:4

6

Solved

I have a BehaviorSubject that I would like to reset - by that I mean I want the latest value to not be available, just as if it was just created. I don't seem to see an API to do this but I suppos...
Spunky asked 30/8, 2017 at 12:12

2

I was reading the doc, and after tweaking its sample code, I managed to get compiler barked at me about cyclic dependencies like this: <script> let count = 0; $: double = count * 2; $: i...
Molly asked 11/7, 2019 at 13:50

3

Solved

I use shareReplay to call only once (like a cache) a webservice to retrieve some informations : In my service : getProfile(): Observable<Customer> { return this.callWS().pipe(shareReplay(1...
Willettawillette asked 24/1, 2019 at 14:1

2

Solved

Using Spring with Reactor Project to zip multiple api calls as aggregated result. Can Mono.zip() with Mono.empty() parameters return null result? Mono<Dog> dogMono = dogApiClient.getDog(); //...
Languid asked 5/8, 2019 at 17:12

2

I am using Spring Webflux, and I need to return the ID of user upon successful save. Repository is returning the Mono Mono<User> savedUserMono = repository.save(user); But from controller...

1

I have a single source of data items and I want to share that Flux with multiple downstream streams. It is very similar to the example in the reference guide, but I feel that example cheats by ca...
Staggers asked 16/6, 2019 at 12:48

5

Solved

I'm new in reactive programming. So I have problem when create a stream from an Event, like onClick, ontouch... Can anyone help me solve this problem. Thanks.
Assay asked 23/8, 2014 at 1:53

1

Solved

Is there any way to put more than 8 observable in combineLatest in RxSwift? Here is my current implementation: let registerUserParameters = Observable.combineLatest( firstname.asObservable(), l...
Flexor asked 17/7, 2019 at 8:26

2

Solved

I'd like to create a repeat functionality that creates a loop in my code using Combine. I noticed that Combine does not have a repeat publisher via this great repo: https://github.com/freak4pc/rxsw...
Renn asked 12/7, 2019 at 0:2

2

Solved

Interested in reactive programming, I played a bit with the Building a Reactive RESTful Web Service guide. And wanted to move forwrad and add some unit tests. I tried to test my handler (RouterFun...

2

Solved

Given a list of cars (List<Car> cars), I can do: Observable.just(cars); //returns an Observable that emits one List<Car> Observable.from(cars); //returns an Observable that emits a squ...
Chiquita asked 16/4, 2015 at 11:0

2

Solved

I try to make handler and router classes of spring boot webflux. The model class is user class. Codes are @Getter @Setter @AllArgsConstructor @NoArgsConstructor @Document(collection="Users") publ...

3

Solved

I'm refactoring an app to reactive paradigm using RxJava. I'm doing it step by step so I need to use toBlocking() in some cases in order to respect the interfaces, for the moment. How can I handle ...
Sunless asked 14/3, 2017 at 12:39

2

Solved

I have two observables load$ is a stream of load events, emitted on startup or when a reload button is clicked selection$ is a stream of selected list items, emitted when a list item is selected ...
Endosperm asked 13/7, 2017 at 9:35

1

Solved

I'm a bit confused by the rxjs catchError operator. Here is a simple example using Angular: (live demo here) import { Component } from '@angular/core'; import { of, timer } from 'rxjs' import { t...
Mcmurry asked 24/6, 2019 at 20:28

4

Solved

I'm currently registering a subscriber to a property signal like this: [RACAble(self.test) subscribeNext:^(id x) { NSLog(@"signal fired!"); }]; The default functionality is that it fires every...
Emunctory asked 25/3, 2013 at 12:40

1

I'm trying to figure out how to consume a paginated API in a reactive style, exposing a stream of items instead of the pages that the API gives me. What I Have - A Paginated API The Slack API (an...
Ptolemaic asked 20/6, 2019 at 9:50

© 2022 - 2024 — McMap. All rights reserved.