Comments (7)
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.
@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.
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),
});
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.
@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.
I vote to resume all subscribers when reconnected.
If others like the idea of auto-reconnect, that sounds good to me, too.
from redis.
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.
Any news?
from redis.
Related Issues (20)
- BulkNil and execArrayReply breaking xread
- PubSub with binary messages HOT 1
- [feat] keepalive feature
- [feat] automatically reconnect when interrupted
- Bug: xrange failed to parse empty string
- deps: import `cluster-key-slot` and `lodash-es` from esm.sh
- Support for RedisJson - JSON.GET
- Support AbortController in a client HOT 1
- Watch vs tx HOT 1
- Subscribe / psubscribe hangs after calling sub.receive() HOT 1
- `Redis.scan` cursor parameter requires a number
- sendCommand api inconsistency HOT 1
- Property 'set' does not exist on type 'Redis'.deno-ts(2339) HOT 5
- Parallel Request Issue HOT 1
- Subscribe, unsubscribe, resubscribe HOT 4
- feat: Auto-pipelining
- feat: Connection pooling
- Errors on concurrent pipeline invocation HOT 3
- Sentinel Support
- Hang up on auto reconnect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis.