In-memory persistence for streams