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
5
votes
2 answers

Receiving items from reactive stream SubmissionPublisher

I was trying out some of the new features in Java 9. So I put together a test to have a publisher, emitting numbers at a given rate. I also implemented a Subscriber to listen to those publications and just print them to console. Although I might not…
nuvio
  • 2,555
  • 4
  • 32
  • 58
5
votes
1 answer

End-to-End Reactive Streaming RESTful service (a.k.a. Back-Pressure over HTTP)

I have been trying to clarify this question online for a while without success, so I will try to ask it here. I would like to find some resource or example where it shows how I can build an end-to-end fully back-pressured REST service + client.…
mdm
  • 3,928
  • 3
  • 27
  • 43
4
votes
1 answer

Performance hit migrating from MongoDB Java Rx driver to reactive streams driver

We're trying to upgrade from the old RxJava-based Mongo driver mongodb-driver-rx (v1.5.0) to the newer mongodb-driver-reactivestreams (v1.13.1) - not the newest one because of dependencies, but certainly a lot newer. The old RxJava one has been…
mlkammer
  • 200
  • 11
4
votes
1 answer

RxJava multiple consumers of one publisher

I'm writing some kind of middleware HTTP proxy with cache. The workflow is: Client requests this proxy for resource If resurce exists in cache, proxy returns it If resource wasn't found, proxy fetching remote resource and returns to the user. Proxy…
Kirill
  • 7,580
  • 6
  • 44
  • 95
4
votes
0 answers

AMQP consumer stops receiving on 127th message

PROBLEM: The publisher app continuously publishes AMQP messages to Artemis broker - but, the consumer app stops receiving messages after the 127th. Fwiw - Coincidentally, noticed an excerpt from a Smallrye web page cites: "the default buffer size…
4
votes
2 answers

In rxjs how can I create groups of sequential values?

I have a stream of values in this form: [1,2,3,1,2,1,1,1,2...] I would like to convert it to a stream of groups in the form: [[1,2,3],[1,2],[1],[1],[1,2]...] New group should be created every time value becomes 1.
Marinos An
  • 9,481
  • 6
  • 63
  • 96
4
votes
1 answer

How to convert nested list in Mono to Flux?

I am very new to reactive-streams, Can someone help me to convert Mono to Flux I tried something like this - Flux myMethod(Mono homeWork) { return homeWork.map(h -> h.multiplicands) …
user3595026
  • 560
  • 2
  • 9
  • 26
4
votes
1 answer

Reactive Streams: Spring WebFlux - subscribe to existing publisher

I am currently migrating our existing Spring asynchronous REST architecture to Spring's new WebFlux library and have a question around joining multiple requests so that they can listen for the same published response. Use Case is as follows: Client…
wild_nothing
  • 2,845
  • 1
  • 35
  • 47
4
votes
1 answer

Application-level back-pressure VS TCP native flow-control

I am investigating why some systems implement application-level back-pressure given that TCP provides native flow control. I was reading, in particular, akka-streams and (an higher level discussion) reactive streams. Is it only to abstract out the…
affo
  • 453
  • 3
  • 15
4
votes
3 answers

Flux.zip method not emitting all elements

I am working with Reactive Stream and Publishers (Mono and Flux), and combining the two publishers using the zip and zipWith method of Flux as follows: Flux flux1 = Flux.just(" {1} ","{2} ","{3} ","{4} " ); Flux flux2 = Flux.just("…
KayV
  • 12,987
  • 11
  • 98
  • 148
4
votes
2 answers

Stream records from DataBase using Akka Stream

I have a system using Akka which currently handles incoming streaming data over message queues. When a record arrives then it is processed, mq is acked and record is passed on for further handling within the system. Now I would like to add support…
Evan M.
  • 403
  • 5
  • 13
4
votes
2 answers

Akka Stream connect to multiple sinks

I have implemented a custom component in akka stream which takes elements as input, groups and merges them based on a key and sends them out through one of a dozen outlets. You can think of this component as a kind of GroupBy component which does…
user510159
  • 1,379
  • 14
  • 26
4
votes
2 answers

Ways to maintain back pressure in Akka Streams involving multiple JVMs

I'm aware that as of Akka 2.4.16, there is no "remote" implementation of Reactive Streams. The specification focuses on a stream running on a single JVM. However, considering the use case to involve another JVM for some processing while maintaining…
4
votes
1 answer

Akka-Streams: At-Least-Once-Delivery behaviour with Kafka and Cassandra

I'm starting with Akka Streams and so far everything is going well. However, I have met with a use case that I don't know how to approach. The scenario is a stream with an ActorPublisher as a source that is consuming messages from Kafka and a…
3
votes
2 answers

How can I turn blocking code into a responsive style?

I have always been used to blocking programming and working in the Spring MVC framework. Recently, I considered learning reactive programming. I was full of doubts about how to convert the previous logic into a new style. See the following…