vercel / vercel/resumable-stream

Feature Request: Support for custom Redis clients (Upstash, Valkey, etc.)

Open
#38 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
574
Forks
44
Avg merge
3m
Merged PRs (30d)
1

Description

Problem

Currently, the library only supports two specific Redis client libraries:

  • redis (via resumable-stream)
  • ioredis (via resumable-stream/ioredis)

Users who want to use other Redis-compatible clients like Upstash Redis, Valkey, can do so but they are still required to install one of the above libraries, even though they are unused

Use Cases

  1. Upstash Redis: Users deploying to edge environments (Cloudflare Workers, Vercel Edge Functions) often use Upstash Redis REST API
  2. Valkey: Users migrating from Redis to Valkey (Redis fork) need compatibility
  3. Custom implementations: Teams with custom Redis wrappers or proxies can't integrate easily
  4. Future-proofing: New Redis-compatible clients emerge regularly

Proposed Solution

Add a generic entry point that accepts custom Publisher/Subscriber implementations conforming to the existing interfaces:

import { createResumableStreamContext } from "resumable-stream/generic";
import type { Publisher, Subscriber } from "resumable-stream/generic";

// Users provide their own implementations
const streamContext = createResumableStreamContext({
  waitUntil: null,
  publisher: myCustomPublisher,
  subscriber: myCustomSubscriber,
});

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the existing resumable-stream and resumable-stream/ioredis entry points and the Publisher and Subscriber interfaces described in the issue. Trace how the current Redis clients are wired, then define the generic entry point so callers can provide custom implementations; done means the shown import and configuration work without requiring either existing client library.

Written by the indexing model from the issue text.

Assessment

Tech stack
redis, typescript
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.