Questions tagged [reactive-streams]

a standard for asynchronous stream processing with non-blocking back pressure on the JVM

Reactive Streams is an initiative to provide a standard for asynchronous stream processing with non-blocking back pressure on the JVM.

http://www.reactive-streams.org/

358 questions
15
votes
1 answer

How to properly call Akka HTTP client for multiple (10k - 100k) requests?

I'm trying to write a tool for batch data upload using Akka HTTP 2.0-M2. But I'm facing akka.stream.OverflowStrategy$Fail$BufferOverflowException: Exceeded configured max-open-requests value of [32] error. I tried to isolate a problem and here is…
relgames
  • 1,356
  • 1
  • 16
  • 34
14
votes
2 answers

Spring Boot Webflux/Netty - Detect closed connection

I've been working with spring-boot 2.0.0.RC1 using the webflux starter (spring-boot-starter-webflux). I created a simple controller that returns a infinite flux. I would like that the Publisher only does its work if there is a client (Subscriber).…
13
votes
4 answers

How can I know if Observable has finalized with error or without error?

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 })); As you see, I'm using finalize operator, but I…
Héctor
  • 24,444
  • 35
  • 132
  • 243
13
votes
1 answer

Error in graph create: requirement failed: The inlets [] and outlets [] must correspond to the inlets [in] and outlets [out]

I'm using akka streams graphDSL to create a runnable graph. There are no compile-time errors wrt inlet / outlet of the stream components. Runtime throws following error: Any ideas what should I verify to make it run ? requirement failed: The inlets…
phantomastray
  • 449
  • 3
  • 16
12
votes
1 answer

Reactor Flux to Mono>

How can I convert Flux directly to Mono> ? I am looking for equivalent of Single> single = observable.toList() from RxJava. With blocking operator I can do it like this: val just: Mono> =…
Dariusz Bacinski
  • 8,324
  • 9
  • 38
  • 47
11
votes
1 answer

Use-cases for reactive streams using java 9 Flows in Servlets?

I'm looking for use-cases for using reactive streams within a servlet container (or just a HTTP server). The Jetty project has started being asked: "is Jetty reactive?" and we've noticed the proposal to add reactive streams to java 9. So we've…
gregw
  • 2,354
  • 20
  • 21
11
votes
1 answer

How can I publish or subscribe to a materialized Akka Stream flow graph?

I'm playing around with Akka Stream and I'm trying to figure out its flexibility after materialization. One way to do so is to use the low level reactive streams…
Ruurtjan Pul
  • 1,197
  • 1
  • 10
  • 21
10
votes
1 answer

How reactive stream works with HTTP? What is reactive http?

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("responsebody/flux") public Flux tt2() { …
10
votes
1 answer

How REST endpoints are auto subscribed while calling from Browser/REST Client?

In ProjectReactor or Reactive Streams, Nothing Happens Until You subscribe(). Reactive streams data flow will not happen unless until someone subscribe to it, but I see for all REST APIs like finds, save and inserts are not calling subscribe…
10
votes
3 answers

How are reactive streams used in Slick for inserting data

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 backpreasure based on your insertion rate? I've…
tonicebrian
  • 4,715
  • 5
  • 41
  • 65
10
votes
2 answers

Akka-Stream implementation slower than single threaded implementation

UPDATE FROM 2015-10-30 based on Roland Kuhn Awnser: Akka Streams is using asynchronous message passing between Actors to implement stream processing stages. Passing data across an asynchronous boundary has an overhead that you are seeing…
10
votes
2 answers

In akka-stream how to create a unordered Source from a futures collection

I need to create an akka.stream.scaladsl.Source[T, Unit] from a collection of Future[T]. E.g., having a collection of futures returning integers, val f1: Future[Int] = ??? val f2: Future[Int] = ??? val fN: Future[Int] = ??? val futures = List(f1,…
Tvaroh
  • 6,645
  • 4
  • 51
  • 55
9
votes
4 answers

How to convert Reactor Flux to InputStream

Given that I have a Flux 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 WebClient.get('example.com').exchange.flatMap {…
9
votes
3 answers

project reactor - How to combine a Mono and a Flux?

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 mono1 = Mono.just("x"); Flux flux1 = Flux.just("{1}", "{2}",…
1
2
3
23 24