Giter Club home page Giter Club logo

Comments (7)

sebastienfilion avatar sebastienfilion commented on July 18, 2024 5

As a first step, I created a test to reproduce the issue that @devalexqt reported. If it makes sense, I can look into suggesting a fix. #92

from redis.

sebastienfilion avatar sebastienfilion commented on July 18, 2024 5

@Terkwood that was my idea. I’ve been working on a solution for the past few days; finishing testing. I hope I can push tomorrow for you all to see.

from redis.

uki00a avatar uki00a commented on July 18, 2024 4

Problem

I think the problem is that once connection is lost, the subscriber never resumes.

Solutions

To resolve the above problem, I think that deno-redis should do the following things:

  • provides a way to reconnect the lost connection.
  • resumes (all?) subscribers when reconnected.

What about the other libraries?

ioredis provides the auto-reconnect and auto-resubscribe features:

new Redis({
  maxRetriesPerRequest: 5,
  autoResubscribe: true, // When reconnected, the subscriber will also resume.
  retryStrategy: times => computeNextTimeout(times),
});

go-redis

PubSub automatically reconnects to Redis Server and resubscribes to the channels in case of network errors.

https://pkg.go.dev/github.com/go-redis/[email protected]+incompatible?tab=doc#PubSub

from redis.

uki00a avatar uki00a commented on July 18, 2024 3

@devalexqt @Terkwood @sebastienfilion I'm sorry for the delay response.
I've organized my thoughts.
If you have any other ideas, please leave comments! 😄

from redis.

Terkwood avatar Terkwood commented on July 18, 2024 3

I vote to resume all subscribers when reconnected.

If others like the idea of auto-reconnect, that sounds good to me, too.

from redis.

Terkwood avatar Terkwood commented on July 18, 2024 1

Nicely documented! I think the next step here is for another person to reproduce this(probably not so hard), and make a suggestion on how to improve it.

from redis.

devalexqt avatar devalexqt commented on July 18, 2024

Any news?

from redis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.