reactive-streams Questions

6

I'd like to stay complete reactive within my new spring application. Therefor I use web-flux/ reactor and ReactiveRepository with MongoDB. Do you know how to integrate java-mail reactively into th...
Alluvial asked 28/6, 2018 at 22:16

4

Solved

I am using publishOn vs subscribeOn both on the same flux as follows: System.out.println("*********Calling Concurrency************"); List<Integer> elements = new ArrayList<>(); Flu...

3

Solved

I've a use case where the stream should only emit when the cumulative "sum" equals or exceeds a given value, n. Let's take the example of six integers with n = 5. +---+------+---------+ |...

4

Solved

I need to execute some code when Observable is completed depending on whether has finalized with error or without. I have this code: const obs = getMyObservable().pipe(finalize(() => { //here ...
Abilene asked 18/5, 2018 at 10:48

1

I'm kind of new to Reactive Stream, so I got a question when using Spring Webflux and Reactor. I made a snippet like below: @RestController public class TestController { @GetMapping("response...
Ioneionesco asked 24/7, 2020 at 2:41

5

Solved

I started using Project reactor and one place where I'm struggling little is how do I combine things coming from Mono with Flux. Here's my use case: public interface GroupRepository { Mono<Gr...
Dislimn asked 19/4, 2017 at 21:48

1

Solved

I've read from the documentation that flatMap: Transform the elements emitted by this Flux asynchronously into Publishers, then flatten these inner publishers into a single Flux through merging, w...
Viewfinder asked 22/4, 2022 at 15:18

0

I want to Triger the below two calls parallelly and combine the Mono and flux. Mono<EmpAddressDetail> empAddDetail = getTimeoutDuration() .flatMapDelayError(duration -> timeoutWrappedEmpD...
Affirmatory asked 20/4, 2022 at 23:5

1

I'm working on an ETL project. I've been using spring integration for a long time. The data source is currently files or chronicle but it may change to live streams and volumes are likely to grow. ...

5

Solved

As per the documentation: Flux is a stream which can emit 0..N elements: Flux<String> fl = Flux.just("a", "b", "c"); Mono is a stream of 0..1 elements: Mono<String> mn = Mono...
Prince asked 27/12, 2017 at 7:57

2

Solved

Note: Here the terms Subscriber and Subscription are being used from the reactive streams specification. Consider the following @RestController methods in a spring boot webflux based microservice....
Anthropomorphous asked 10/1, 2018 at 6:51

6

I have below code retuning Mono<Foo>: try { return userRepository.findById(id) // step 1 .flatMap(user -> barRepository.findByUserId( user.getId()) // step 2 .map(bar-> Foo.builder()...
Jurkoic asked 25/6, 2018 at 13:8

1

Solved

I have come across a behaviour I don't understand when using Sinks.Many<String> to notify some events to multiple subscribers: fun main() { val sink : Sinks.Many<String> = Sinks.many(...
Tricia asked 17/3, 2021 at 10:55

3

I have an external (that is, I cannot change it) Java API which looks like this: public interface Sender { void send(Event e); } I need to implement a Sender which accepts each event, transform...
Slavism asked 30/11, 2018 at 8:57

2

In the blog post Flight of the Flux 3, the authors suggest wrapping a synchronous blocking call in a Mono with a subscribeOn call, as shown in this snippet from the article: final Flux<String&gt...
Messiah asked 9/12, 2020 at 19:21

1

I've been looking for hints on how to best test Spring MVC Controller methods that return SseEmitters. I have come up pretty short, but have a trial-and-error solution that tests against asynchrono...
Sustenance asked 10/5, 2016 at 14:0

4

Solved

Given that I have a Flux<String> of unknown size, how can I convert it into InputStream that other library is expecting? For example with WebClient I can achieve that using this approach W...
Imagine asked 5/8, 2018 at 14:17

1

Solved

What is the difference between transform & transformDeferred in project reactor flux. Good example will be helpful. https://projectreactor.io/docs/core/release/reference/index.html#advanced-mut...

6

Solved

I'm using WebClient and custom BodyExtractorclass for my spring-boot application WebClient webLCient = WebClient.create(); webClient.get() .uri(url, params) .accept(MediaType.APPLICATION.XML) ....

3

Let's say i have the following chain: public Mono<B> someMethod( Object arg ) { Mono<A> monoA = Mono.just( arg ).flatMap( adapter1::doSomething ); // success chain return monoA.map(...
Thesaurus asked 18/4, 2018 at 11:7

4

My question is about navigation used with the BLoC pattern. In my LoginScreen widget I have a button that adds an event into the EventSink of the bloc. The bloc calls the API and authenticates the ...
Aquilegia asked 28/7, 2018 at 3:56

3

Solved

In Slick's documentation examples for using Reactive Streams are presented just for reading data as a means of a DatabasePublisher. But what happens when you want to use your database as a Sink and...
Gammon asked 4/4, 2016 at 10:27

1

In RxJava 2 and Reactor there is a switchIfEmptylike method to switch to new flow if there is no elements in current flow. But when I began to use Minuty, I can not find an alternative when I conv...
Ferrara asked 10/4, 2020 at 13:4

3

Solved

I have a Flux and Mono and I'm not sure how to combine them so that I will have the mono value in each item of the Flux. I'm trying this approach but it's not working: Mono<String> mono1 = ...
Part asked 30/7, 2018 at 22:24

2

Solved

I have the below async tasks: public class AsyncValidationTask { // Returns Mono.error(new Exception()) if error, otherwise Mono.empty() public Mono<Void> execute(Object o); } public cla...
Eunuchize asked 24/3, 2020 at 17:42

© 2022 - 2025 — McMap. All rights reserved.