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
2
votes
1 answer

Spring reactor: How to wait for multiple Flux's by key?

Conceptually, I have a source that emits IP addresses (indefinitely) and two processors. Those processors essentially make IO requests. What I'd like to do is to merge the results of these processors when they're done and to pass them to some sink…
IsaacLevon
  • 2,260
  • 4
  • 41
  • 83
2
votes
2 answers

Execute transformation steps on the blocking thread for Mono

Is there a way to ensure that all transformation steps for a single Mono that created from a future are executed on the thread that subscribes and blocks? For instance, the following code public static void main(String[] args) { var future = new…
SerCe
  • 5,826
  • 2
  • 32
  • 53
2
votes
0 answers

Is there a way to work past a stream in functional fashion?

In a method, my code accesses a database and returns a Flux of data from the source. Flux is a stream similar to the Java Stream API. The query may or may not return any objects since they may not match the predicate. Whats the functional way of…
ayush prashar
  • 436
  • 5
  • 13
2
votes
1 answer

Splitting a WebClient Post of a Streaming Flux into JSON Arrays

I am using a third-party REST controller which accepts an array of JSON objects and returns a single object response. When I POST from a WebClient using a limited Flux the code works (I assume, because the Flux completes). However, when the Flux is…
lafual
  • 683
  • 1
  • 7
  • 23
2
votes
1 answer

Running out of memory when loading large amount of records from database

I am using slick in Akka Streams to load large number of records (~2M) from the database (postgresql) and write them to an S3 File. However, I'm noticing that my code below works for records around ~50k but fails for anything over around 100k mark.…
Anthony
  • 33,838
  • 42
  • 169
  • 278
2
votes
1 answer

Combining multiple flowables

I am migrating my project from Spring to Ktor, and decided to replace the implementation of reactive streams which was initially Reactor to RxJava 2. Although I faced some problem when trying to combine multiple streams into single one at the end of…
sh1nen
  • 199
  • 4
  • 18
2
votes
1 answer

Spring Reactive stream is not working with Netflix Zuul Reverse proxy

We created 7 micro-services for our project and all are exposed through zuul proxy. One of the micro service(Live-dashboard) contains Spring boot reactive stream for live dashboard refresh using (Server sent events). The reactive stream is working…
2
votes
1 answer

Throttle stream based on external input

Looking at the signature of throttle in Akka Streams I see that it can take a cost function of type (Out) ⇒ Int to compute how the element passing through the stage affects the cost/per speed limit of elements sent downstream. Is it possible to…
Samuel Heaney
  • 773
  • 1
  • 8
  • 14
2
votes
0 answers

"Who moves" MongoDB Reactive Streams Java Driver

I Know that this driver fulfill the "Reactive Streams API" but what kind of Threadpool is in the core of this implementation? for exmaple Redisson use Netty but what is used in this MongoDB Reactive Streams API?
joliva
  • 330
  • 3
  • 10
2
votes
0 answers

Test failure in Spring 5.1

I tried to upgrade my sample codes to 5.1 and Spring Boot 2.1. The Reactor Netty is refactored in the new version, some APIs are changed, I changed my codes according to the new version of Reactor Netty. HttpServer for Reactor…
2
votes
1 answer

Webflux & WebSocket, send to specific session id

Every session data passed into the socket is broadcasted to all users since every session subscribes to the UnicastProcessor eventPublisher. How can I send by event data to a single session id and not to all of them? @Override public Mono
2
votes
0 answers

Why subscribeOn deadlocks if request done from separate thread

In the subscribeOn documentation, its says Note that if you are using an eager or blocking create(Consumer, FluxSink.OverflowStrategy) as the source, it can lead to deadlocks due to requests piling up behind the emitter. In such case, you should…
Ashok Koyi
  • 5,327
  • 8
  • 41
  • 50
2
votes
1 answer

CompletableFuture solution to Reactor (or Akka) solution

I have the following method using CompletableFuture like this: public AClass aMethod() { CompletableFuture someClassAFuture = CompletableFuture.supplyAsync(() -> someMethodThatReturnsA()); CompletableFuture
italktothewind
  • 1,950
  • 2
  • 28
  • 55
2
votes
1 answer

Using ForkJoinPool.commonPool() in place of RxJava's computation scheduler

I'm currently implementing a small subset of RxJava2's API for a personal project. I have a listener-based API and I started writing the code to wrap my listener and implementing Flowable.create(): public class EventBus { private final…
Martín Coll
  • 3,368
  • 3
  • 37
  • 52
2
votes
0 answers

Spring data couchbase reactive findById return's different results for same document id

I am using Spring data couchbase with reactive repository. Calling findById method from reactive repository. Once while updating checking if record exists and another one while fetching by document id. Both cases passing the unique value which…