Is it safe to use "response.streaming.enabled" & "request.streaming.enabled"?

Hi Folks,

We are implementing push notification using following technology stack:

Backend: Spring boot with WebFlux (reactive programming dependency)

PubSub: Kafka

Proxy: APIGee

FrontEnd: Angular

App Overview: Whenever new message comes in Kafka-Queue-Topic we need to Populate this msg on UI without any human intervention.

For this, on backend side I’ve used WebFlux and on front end EventSource(interface noting but socket connection)

For now I’m exposing localhost server over the internet using ngrok and Configured this end point in apigee as HttpTargetConnection

Following is the configuration on APIGee:

<HTTPTargetConnection> 
   <Properties> 
	<Property name="response.streaming.enabled">true</Property> 
	<Property name="request.streaming.enabled">true</Property> 
</Properties>  
<URL>{ngrokEndPoint}</URL>  
</HTTPTargetConnection>

Looking at the code it seems two socket connection :

  • Frontend: Socket connection: var EventSource = new EventSource(PROXY);
  • WebFlux: I’m having /event end point with Content-type: text/event-stream

My Questions are as follow:

1. Will this config (response.streaming) raise Scaling issue?

2. What all other solution i can use?

3. Does apigee support socket connection?

4. What are risks of using request and response streaming.

Let me know if you need more detail.

0 1 233
1 REPLY 1

Not applicable

If you have streaming required you can do. But more use of this will impact the other APIs performance.

So, less use is fine.

You cannot do any operation over the particular proxy response when streaming is enabled.

If very response is very big, suggest to implement pagination in the backend side.