alexandrevicenzi / go-sse

Server-Sent Events for Go
MIT License
172 stars 40 forks source link

Javascript client is receiving messages by batch #11

Closed kabaluyot closed 4 years ago

kabaluyot commented 4 years ago

In a for loop, I am consuming a lot of stock data streams and publishing it in SSE. However upon checking the browser with the received SSE messages, they are received in batch, not pure real-time.

Is there any settings to tweak to make it work?

alexandrevicenzi commented 4 years ago

There's no batiching in this library, if messages are being delayed is by something else, let's say, a proxy.

Once you publish a message it should be dispatched ASAP, you could have delay of couple ms if your app is under huge load, that could be something else as well.