Endpoints

Server sent events

The SSE spec wraps the events with a data field. Note that, using Postman will not show this data field. Using curl, however, will. To our knowledge, most language libraries that cover HTTP Request will show the data field too. Due to CORS restrictions, the SSE endpoint is only accessible from a server.


Manual acknowledgement mode

When in manual acknowledment mode, the stream engine keeps the state of each event so that if the client process crash of disconnect, no events will be dropped:

When a client disconnect, the unacknowledged events are kept in the server and upon reconnection, events that have not been acknowledged will be resent in the original order:

In the scenario where a client acknowledge the events out-of-order, then only events that have NOT been acknowledged will be resent. In the following diagram, only 4 and 6 would be resent:

Reemission of unacknowledged events

Events are retried in two scenarios:

  • If the stream stay connected but some events are NOT acknowledged for a long period of time (5 minutes ?), then client will be assumed unresponsive and the stream will be gracefully disconnected from the server side.
  • If the stream is reconnected, all potentially unacknowledged events will be resent in stream order.