I am using ParallelFlux for running many task.
but when i am receiving webClient response using bodyToFlux method its merging all the output response instead of getting one by one.
i want the output should be one by one not single string, is there any other method instead of bodyToFLux need to use.
request method:
Flux<String> responsePost = webClient.build() //removed get,url and retrieve here .bodyToFlux(String.class); responsePost.subscribe(s -> { //display response });response method:
public ParallelFlux<String> convertListToMap() { //created list of string str return Flux.fromIterable(str) .parallel(3) .runOn(Schedulers.parallel()) .map( s -> { //some logic here }); }output:
parallel fulx reponse: springwebfluxparellelExample
webClient response using bodyToFlux method merging all the received response instead separating it out
3.7k views Asked by Shekhar Rathore At
1
There are 1 answers
Related Questions in SPRING-WEBFLUX
- How do you retrieve body from ClientResponse?
- WebClient apears to add headers to request on its own. Where does it happen?
- How to build a reactive application using React Query and Spring Webflux
- How can I make asserts on outbound HTTP requests?
- Spring Security Reactive OAuth2 Client: Options for Customizing Refresh Endpoint
- Spring ReactiveMongoRepository function with nested reactive operations timing out
- how to avoid handling `AbortedException` with Spring WebFlux while handling for generic Exceptions?
- Default /logout does not work if /login is customised spring security 5.7.11
- CompletableFuture: thenAccept called but whenComplete is not
- WebFlux is unable to decode Chunked requests properly
- getting error for Macbook Air M1 "Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider, fallback to system defaults
- For Spring Boot Webclient, what is the preferred mechanism to log non-parseable responses?
- Should I use concatMap in reactive for DB call?
- Create webclient object based on changes in BaseURL & scope
- Reactive Spring Security is always creating the Session in redis even when NoOpServerSecurityContextRepository specified for securityContextRepository
Related Questions in SPRING-WEBCLIENT
- How to configure Spring WebClient to reuse access tokens
- How to avoid byte[] for download of 4GB file
- Create webclient object based on changes in BaseURL & scope
- How to set up WebClient so that it makes multiple calls with a given buffer max limit instead of increasing the buffer max limit?
- Spring WebClient make a PUT request with content-type 'hex' and body
- Re-write usage of Spring WebClient from Java to Scala
- How to set HTTP response timeout with Spring Webclient when using JDK HTTPClient
- How can i generate optional values in openapi generator?
- Handling Original Exception in Spring WebClient Retry Strategy
- How to block() Reactor Http thread while calling third party api using Spring boot webclient?
- [SpringCloudGateway-WebFlux]: How to call non-blocking WebClient API in synchronized block in reactive paradigm to ensure its invoked only once
- Spring WebClient randomly got connection reset by peer when access aws API gateway
- While using WebClient retryWhen is not executed when using exchangeToMono
- Spring WebClient Error - Reactor.core.publisher.LambdaMonoSubscriber cannot be cast to class org.springframework.web.client.RestClient
- Is there a way to aggregate multiple WebClient calls that return Flux<DataBuffer> into one Zipped Flux<DataBuffer> response without memory overhead?
Related Questions in SPRING-REACTIVE
- Working example of Spring boot reactive and EventSource
- Webflux request/response logging
- Using reactor context to get back results from downstram chain
- Is there any risk in having reactive approach micro-services for API integration (direct using WebClient) ,without any message broker?
- How to get rid of the conversionServicePostProcessor bean conflict?
- How to use Spring WebClient to make a subsequent call with different header setting?
- How to create a generic wrapper for just any method call?
- How to test HandlerFunction without RouterFunction in WebFlux using Functional API?
- Get current logged in user in Spring AOP using Spring Webflux
- How to stop main thread to complete all Mono calls?
- Spring Boot Webflux Handler errors when decoding XML request body content to Mono or Flux object
- Spring reactive Webclient timeout
- Custom Health Indicator for multiple instances of a Spring Boot Application
- webClient response using bodyToFlux method merging all the received response instead separating it out
- Stream<Mono<T>> to Flux<T> in spring reactor
Related Questions in SPRING5
- Spring security hasPermission is not working in Service layer
- Error resolving templates: template might not exists or might not accessible by any of the configured Template Resolver in Thymeleaf
- Application is loosing Spring authentication context in Threads
- Websphere Liberty with Spring upgrade from 4.2.1 to Spring 5.3.29 issue Caused by: java.lang.NoSuchMethodError: javax/validation/Configuration
- FreeMarker template evaluates all what is in expressions to null or missing
- Spring AOP, how an annotation on an interface's method can be applied to the implement method?
- "UnsupportedOperationException: Collision adding composited set with no SetMutator set" related to Apache collection4's CompositeMap
- JSON parse error: Cannot deserialize value of type `FType` from String \"E\": not one of the values accepted for Enum class
- Failed to read schema document 'xsd', because 'zip' access is not allowed due to restriction set by the accessExternalSchema property
- Where can I get a complete pom file for a Spring 5 web application?
- Common place to set custom validators in Spring 5
- Apache Velocity 1.7 cannot find templates, but only when deployed on linux
- How to implement this logic
- Resolve Custom Protocol Prefix in spring configuration
- java.lang.reflect.InaccessibleObjectException:throws java.lang.CloneNotSupportedException
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Here instead of returning ParallelFlux create an ResponseBody class with variable you want to return, assign your response to variable inside ResponseBody and return it to caller of API function.