Giter Club home page Giter Club logo

stackexchange.redis.resilience's Introduction

StackExchange.Redis.Resilience

Provides a wrapper for IConnectionMultiplexer which is able to do a force reconnect when StackExchange.Redis fails to reconnect by using the logic from LazyReconnect.

Nuget package:

Usage

var configuration = "127.0.0.1";
var multiplexer = new ResilientConnectionMultiplexer(() => ConnectionMultiplexer.Connect(configuration));
var multiplexer2 = new ResilientConnectionMultiplexer(
    () => ConnectionMultiplexer.Connect(configuration),
    new ResilientConnectionConfiguration
    {
        ReconnectMinFrequency = TimeSpan.FromSeconds(60),
        ReconnectErrorThreshold = TimeSpan.FromSeconds(30)
    });
var multiplexer3 = new ResilientConnectionMultiplexer(
    () => ConnectionMultiplexer.Connect(configuration),
    () => ConnectionMultiplexer.ConnectAsync(configuration));

Known limitations

  • IBatch methods may throw an ObjectDisposedException when a reconnect was done after the batch was created.
  • ITransaction methods may throw an ObjectDisposedException when a reconnect was done after the transaction was created.
  • Enumerating a collection from IDatabase.SetScan, IDatabase.HashScan and IDatabase.SortedSetScan methods may throw an ObjectDisposedException when a reconnect was done while iterating the collection.

stackexchange.redis.resilience's People

Contributors

maca88 avatar alex-zaikman avatar rmeshksar avatar

Stargazers

 avatar Giorgi Chakhidze avatar  avatar Ed Kennedy avatar Charles Lindsay avatar Amit Parab avatar  avatar  avatar Daniel Larsen avatar Dan Sargeant avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar

stackexchange.redis.resilience's Issues

ReconnectSubscriberByFailure unit test fails

Hi,
Thanks for the great library.

Just wanted to report that ReconnectSubscriberByFailure unit test always fails for me.
Does it mean the functionality is broken or the unit test is invalid?

Support StackExchange.Redis version 2.6.122

Hey,
due to a breaking change in StackExchange.Redis we can't update this nuget to later versions without updating yours too.
Can you please support this (or higher) version?

Thanks!

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.