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

When FlatMap will listen to multiple sources concurrently?

What are the situations which cause Flux::flatMap to listen to multiple sources (0...infinity) concurrently? I found out, while experimenting, that when the upstream send signals to flatMap in thread thread-upstream-1 and there are N inner streams…
Stav Alfi
  • 13,139
  • 23
  • 99
  • 171
0
votes
1 answer

reactor-core crash and restart state

I am new to reactor-core, have done Erlang in the past. Hopefully a quick question. Say we send out a message 'A' and then expect a response in x minutes. If the response does not come in x minutes, we run a fallback routine. It can be done using…
Suchak Jani
  • 145
  • 1
  • 13
0
votes
1 answer

How to sessionize / group the events in Akka Streams?

The requirement is that I want to write an Akka streaming application that listens to continuous events from Kafka, then sessionizes the event data in a time frame, based on some id value embedded inside each event. For example, let's say that my…
dks551
  • 1,113
  • 1
  • 15
  • 39
0
votes
2 answers

Merge Hot and Cold Observable with buffer

I have 2 sources of data. A service call which gets the current state of a list of items A stream of updates to these items I am trying to merge them in a way that I don't lose any of the updates while making the service call. I made a simple…
0
votes
2 answers

How to get thread information logs when calling publishOn

I am working on Schedulers in reactive streams and using a Flux and Scheduler on this Flux using the publishOn method as follows: System.out.println("*********Calling Concurrency************"); List elements = new ArrayList<>(); …
KayV
  • 12,987
  • 11
  • 98
  • 148
0
votes
2 answers

How to implement Hot Stream in Reactive Programming

As per the Reactive Stream paradigm, Currently, we’ve focused primarily on cold streams. These are static, fixed length streams which are easy to deal with. A more realistic use case for reactive might be something that happens infinitely. For…
KayV
  • 12,987
  • 11
  • 98
  • 148
0
votes
1 answer

How to pass a message to another Subscriber?

I am learning the Reactive Stream API of Java 9. As it has the Publisher and Subscriber, and the Subscriber subscribes to the Publisher and the Subscriber also implements the following messages: public class TestSubscriber implements…
KayV
  • 12,987
  • 11
  • 98
  • 148
0
votes
1 answer

Left outer join two sorted sparse sequences with project-reactor

Given two sorted streams of entities with sparse IDs. Let's model them as: Flux stream1 = Flux.fromArray(new Long[] {1L, 3L, 4L, 5L, 6L}); Flux stream2 = Flux.fromIterable(List.of(1L, 2L, 3L, 4L, 6L, 7L)); Implement a function that…
Dmytro Voloshyn
  • 299
  • 4
  • 6
0
votes
1 answer

Eliminating internal collecting when constructing a Source as a response to data

I have a Flow (createDataPointFlow) which is constructed by performing a mapAsync which collects data points (via Sink.seq) which I would otherwise like to stream directly (i.e. without collecting first). However, it is not obvious to me how I can…
Damian
  • 2,709
  • 2
  • 29
  • 40
0
votes
3 answers

Spring WebFlux: Reactive MongoDB

I'm new to Spring Reactor, so i want to refactor this simply spring data (on kotlin) method: fun save(user: User): Mono { if (findByEmail(user.email).block() != null) { throw UserAlreadyExistsException() } user.password =…
maistrovyi
  • 63
  • 1
  • 7
0
votes
1 answer

How to copy some records from TableA to TableB with slick-streaming and akka-streaming

There are two tables TableA and TableB. I need to copy some records from TableA to TableB. I use slick-3.0 and use the following way: import akka.stream._ import akka.stream.scaladsl._ ... //{{ READ DATA FROM TABLE A val q =…
John Mullins
  • 1,061
  • 4
  • 11
  • 38
0
votes
1 answer

How to combine results into stream from multiple sources

I use slick-3.0.0 and try to use streaming. Suppose there are AccountsTable and PreferencesTable: I want to get some info from PreferencesTable and use it into stream from AccountsTable. For example (see TODO): val somePrefQuery: Query[Rep[String],…
John Mullins
  • 1,061
  • 4
  • 11
  • 38
0
votes
1 answer

Reactive stream Kafka Stream Fan-out to http actors

I'm very new to Akka Streaming and reactive streaming. I have a question: is it possible to have a rest API receiving a message dropping it on Kafka Bus, and the Kafka streaming consumer then aggregates the messages in a max. time window and retrun…
0
votes
1 answer

akka stream custom graph stage

I have an akka stream from a web-socket like akka stream consume web socket and would like to build a reusable graph stage (inlet: the stream, FlowShape: add an additional field to the JSON specifying origin i.e.…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
0
votes
1 answer

Can't use reactivestream Subscriber with akka stream sources

I'm trying to attach a reactivestream subscriber to an akka source. My source seems to work fine with a simple sink (like a foreach) - but if I put in a real sink, made from a subscriber, I don't get anything. My context is: import…
Nathan Kronenfeld
  • 473
  • 1
  • 5
  • 14
1 2 3
23
24