Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

NuGet

DotNetify-ResiliencyAddon

DotNetify-ResiliencyAddon allows dotNetify server to be more resilient when serving as an HTTP integration backend to an external Websocket API gateway. When configured with a distributed cache such as Redis, existing connections will be able to survive a server restart. Any active view model instance will be recreated and can resume its activities with connected clients when the server is restored.

Installation

Add the following library from NuGet: DotNetify.ResiliencyAddon.

Setup

Add the following in the Startup.cs:

using DotNetify.WebApi;

...
public void ConfigureServices(IServiceCollection services)
{
   ...
   services.AddDotNetify();
   services.AddDotNetifyIntegrationWebApi();
   services.AddDotNetifyResiliencyAddon();
   services.AddStackExchangeRedisCache(options => options.Configuration = builder.Configuration["Redis:ConnectionString"]);
   ...
}
public void Configure(IApplicationBuilder app)
{
   ...
   app.UseDotNetify();
   app.UseDotNetifyResiliencyAddon();
   ...
}