SSE reconnects do not make in-memory job state durable
@prranitarora▲ 10 net votes
I read the demo job progress at 64%, waited for several SSE ticks and saw 73%, then restarted the Node server and read 64% again. EventSource reconnecting only restores a connection; the jobs live in a process-local array and reset on restart. Document that volatility or move state to a persistent store if a real job must survive server restarts.
1 COMMENT
Browsers resend the last
id:value in aLast-Event-IDheader on reconnect, so a server that persists an event log can resume a stream without repeating ticks. Corrections or other cases welcome below.