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

How to iterate an object inside a Flux and do an operation on it?

I'm using project reactor and I'd like to perform the following: @Override public void run(ApplicationArguments args) { Flux.from(KafkaReceiver.create(receiverOptions) .receive() …
3
votes
2 answers

Spring Webflux Proper Way To Find and Save

I created the below method to find an Analysis object, update the results field on it and then lastly save the result in the database but not wait for a return. public void updateAnalysisWithResults(String uuidString, String results) { …
andresmonc
  • 398
  • 7
  • 21
3
votes
1 answer

MongoDB Reactive Streams hangs when performing a query

I'm using the MongoDB Reactive Streams Java API which I implemented following this example, but I'm encountering a serious problem: sometimes, when I try to query a collection, the await methods doesn't work, and it hangs until the timeout is…
gscaparrotti
  • 663
  • 5
  • 21
3
votes
1 answer

Reactive Streams vs Reactor pattern?

I wonder what is the relationship between Reactive Streams (defined by Reactive manifesto) and Reactor pattern (https://en.wikipedia.org/wiki/Reactor_pattern). I read that Project Reactor, which I suppose is an implementation of the Reactor pattern,…
Mike
  • 812
  • 9
  • 25
3
votes
0 answers

Spring WebFlux - Distinguish exception types

I have to handle different exceptions in the Spring WebFlux chain. There is a WebClient and I need to have the logic, which would look like below code using the imperative style: try { } catch (WebClientResponseException e) { // flow 1 } catch…
Rahul
  • 1,727
  • 3
  • 18
  • 33
3
votes
2 answers

'producer' type is unknown to ReactiveAdapterRegistry (WebFlux handler)

I have the following route in my application @Bean public RouterFunction route(UserHandler handler) { return RouterFunctions.route(RequestPredicates.POST("/users"), handler::signup); } which is handled by the following…
user15276776
3
votes
3 answers

How to use StreamZip with StreamBuilder?

I have two stream stream1 stream2 I can give one to StreamBuilder and it work. For example: return StreamBuilder( stream: stream1, But when I combine with StreamZip it now give error: StreamZip combinedStream() { return StreamZip(stream1,…
FlutterFirebase
  • 2,163
  • 6
  • 28
  • 60
3
votes
0 answers

how save document to MongoDb with com.mongodb.reactivestreams.client

I am trying to insert a document in MongoDb throw reactive driver: com.mongodb.reactivestreams.client According to official guide "... Only when a Publisher is subscribed to and data requested will the operation happen... Once the document has been…
Jim C
  • 3,957
  • 25
  • 85
  • 162
3
votes
1 answer

Why Flux.flatMap() doesn't wait for completion of inner publisher?

Could you please explain what exactly happens in Flux/Mono returned by HttpClient.response() ? I thought value generated by http client will NOT be passed downstream until Mono completes but I see that tons of requests are generated which ends up…
expert
  • 29,290
  • 30
  • 110
  • 214
3
votes
2 answers

Java Flux vs. Observable/BehaviorSubject

My question is whether or not Flux has the ability to behave like an Observable or BehaviorSubject. I think I get the gist of what a Flux does and how, but every tutorial I see creates a Flux of static content, i.e. some pre-existing array of…
cyberguy
  • 233
  • 3
  • 10
3
votes
2 answers

quarkus: IllegalStateException: You have attempted to perform a blocking operation on a IO thread. This is not allowed, as blocking the IO thread

There is one thing I have trouble understanding with quarkus. I use JPA with Oracle. So I have the error IllegalStateException: You have attempted to perform a blocking operation on an IO thread. This is not allowed, as blocking the IO thread I…
Sekaijin
  • 107
  • 1
  • 6
3
votes
1 answer

How to handle Nested Flux and Monos

My data is stored in Cosmos and it is Hierarchical and stored in different tables. Hiearchy of Data OnBoardingDefinition -> List FeatureStepMappingDefinition -> List OnBoardingStepDefinition -> Step details When I call cosmos I…
cody123
  • 2,040
  • 24
  • 29
3
votes
1 answer

What is the switchIfEmpty alternative in Smallrye Mutiny

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 convert my Quarkus sample to use the Reactive…
Hantsy
  • 8,006
  • 7
  • 64
  • 109
3
votes
0 answers

RSocket resume session/stream after connection is lost

I am using RSocket channel and trying to implement resume functionality, in case the connection to the server is lost. After trying different combinations of resume(), resumeSessionDuration(), resumeStreamTimeout() and resumeCleanupOnKeepAlive()…
3
votes
1 answer

Java reactor: Inappropriate blocking method call

I add this to two places in my code Flux.empty() .collectList() .block(); In one case IntelliJ highlights .block() with error message Inappropriate blocking method call. In the other place it's ok. In Settings -> Inspections I see that…
Vitalii
  • 10,091
  • 18
  • 83
  • 151