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
- Spring 5 Web Reactive - How can we use WebClient to retrieve streamed data in a Flux?
- A real-world controller example with Spring 5: Web Reactive
- Spring controllers not being found
- WebFlux functional: How to detect an empty Flux and return 404?
- How to create a data class implements Spring Secuirty specific UserDetails
- Is there any way to implement pagination in spring webflux and spring data reactive
- File Upload with Functional Webflux
- How to use "Functional bean definition Kotlin DSL" with Spring Boot and Spring WebFlux?
- Spring WebFlux and Kotlin Support: How to do Integration Tests?
- Spring WebFlux, how can I debug my WebClient POST exchange?
- De-serialization error spring boot reactive
- Spring Web Flux Reactive + Server Sent Events = infinite loop?
- Spring 5 Reactive - Why that code doesn't consume CPU?
- how to log Spring 5 WebClient call
- Using spring HATEOAS with spring webflux Functional Web Framework (reactor-netty)
Related Questions in SPRING-WEBCLIENT
- While using Thread sleep on ParallelFlux its not waiting for sleep thread to get completed and executing onComplete() function
- Remote service call from webclient Java : Spring Webflux
- how to safely shutdown executorService on webflux
- Jaeger with webflux and webclient
- How to print raw HTTP Request and HTTP Response with Spring 5 Webclient?
- Using a custom truststore and keystore in Spring Webclient
- Spring Webclient not able to create connections
- WebClient URI template variables from bodyValue?
- Spring WebFlux - a question about duplicating method invocation
- How to make chain of Mono/Flux and implement Retry in sping-webflux
- Spring WebClient : Call method in retry
- Significant failure rate while using WebClient to make non-blocking REST calls
- SpringBoot WebFlux: Parsing Parallel WebClient Requests
- org.springframework.web.reactive.function.client.WebClient MalformedChunkCodingException: Bad chunk header
- In Java Webclient,, how to completely omitting a field when value is null in Mono serialization
Related Questions in SPRING-REACTIVE
- Get current logged in user in Spring AOP using Spring Webflux
- How to test HandlerFunction without RouterFunction in WebFlux using Functional API?
- How to create a generic wrapper for just any method call?
- How to get rid of the conversionServicePostProcessor bean conflict?
- Is there any risk in having reactive approach micro-services for API integration (direct using WebClient) ,without any message broker?
- Using reactor context to get back results from downstram chain
- How to use Spring WebClient to make a subsequent call with different header setting?
- Spring Reactive WebFlux - how to customize the BadRequest error message
- Spring Boot Couchbase Reactive isn't supporting Pagination
- Reactive WebFlux Publish Notifications to specific Subscriber
- How to get User object from Mono<User> without blocking it in Java?
- Generate elements applying a function to two consecutive elements of a Reactor Flux
- Spring Cloud Function and Dead Letter Exchange
- Spring Reactive WebSocket does not come up when spring-web is present
- Stream<Mono<T>> to Flux<T> in spring reactor
Related Questions in SPRING5
- Getting Error while trying to up upgrade spring version from 5.1 to 5.2
- FreeMarker template evaluates all what is in expressions to null or missing
- Spring Boot V 2.4.0 Using DaoAuthenticationProvider SHA-512
- TestRestTemplate and spring security
- Spring 5: MVC controller argument pageable doesn't get initialised
- How to find which method is called when going to route?
- Why am I getting code 400 response instead of error json object in tomcat 9 with spring 5?
- Using jpa2.2 on Websphere with spring/hibernate
- How to get DataSource bean from config in the Junit5
- How to use AbstractMessageConverter using RestTemplate
- webClient response using bodyToFlux method merging all the received response instead separating it out
- Return the complete response using Spring WebClient
- Spring framework and Jersey integration
- How can I wait for Mono to finish so I can utilise generated value
- Not able to switch current directory from one spring project to another
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.