What is resumable-stream and when to use it
mainresumable-stream is a library designed to wrap streams of strings (such as SSE web responses) to allow clients to resume them after a connection loss or to allow multiple clients to follow the same stream.
It is specifically designed for serverless environments that lack sticky load balancing. The library uses a Redis-based pubsub mechanism to coordinate between producers and consumers. It is optimized for low latency and minimal Redis usage; in the common case where recovery is not needed, it only performs a single INCR and SUBSCRIBE per stream.