Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

A Reactive REST Template for making non-blocking async HTTP requests

Pragya Keshap answered on February 15, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • cases where non-blocking synchronous APIs could be favorable to use
  • Non-blocking REST APIs in the core services
  • Non-blocking REST APIs in the composite services
  • Choosing between non-blocking synchronous APIs and event-driven asynchronous services
  • Developing non-blocking synchronous REST APIs

  • A Reactive REST Template for making non-blocking async HTTP requests

    0

    WebClient uses an asynchronous, non-blocking solution provided by the Spring Reactive framework.

    While RestTemplate uses the caller thread for each event (HTTP call), WebClient will create something like a “task” for each event. Behind the scenes, the Reactive framework will queue those “tasks” and execute them only when the appropriate response is available.

    The Reactive framework uses an event-driven architecture. It provides means to compose asynchronous logic through the Reactive Streams API. As a result, the reactive approach can process more logic while using fewer threads and system resources, compared to the synchronous/blocking method.

    WebClient is part of the Spring WebFlux library

    https://www.baeldung.com/spring-webclient-resttemplate

    Popularity 1/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 15 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.