Azure API Management is not working properly with Spring Reactive API, returing Flux as body

Sett, Subhanjan 21 Reputation points
2020-11-10T19:13:59.063+00:00

I have deployed a Spring Reactive API in the Azure App service. The API returns Flux of Quote object every 200 milliseconds. When I am calling this API I am getting a single Quote record every 200 milliseconds. But when I added the Azure APIM over this API and calling the same endpoint though Azure APIM, it is not responding in the same way. Azure APIM is returning a bunch of Quote records after every 1-2 minutes. Is there any special configuration required in the APIM layer to support Reactive Streaming API?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,175 questions
{count} votes

Accepted answer
  1. Pramod Valavala 20,636 Reputation points Microsoft Employee
    2020-11-11T08:33:03.013+00:00

    APIM buffers responses by default. While not yet documented, there is a buffer-response attribute for the forward-request policy that you could set to false to disable it.

    So, your forward-request policy becomes

    <backend>
       <forward-request buffer-response="false" />
    </backend>
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.