Skip to main content
net6.0.NETStandard2.0

Akka.NET Persistence journal and snapshot store backed by Redis.

Published
May 13, 2026
5mo ago
Total Downloads
46.2K
46,189

Install

dotnet add package Akka.Persistence.Redis.Hosting --version 1.5.68-beta1
ProductVersions
.NET
net6.0
.NET Standard
netstandard2.0

README

Akka.Persistence.Redis.Hosting

Akka.Hosting extension methods to add Akka.Persistence.Redis to an ActorSystem

Akka.Persistence.Redis Extension Methods

WithRedisPersistence() Method

public static AkkaConfigurationBuilder WithRedisPersistence(
    this AkkaConfigurationBuilder builder,
    string configurationString,
    PersistenceMode mode = PersistenceMode.Both,
    bool autoInitialize = true,
    Action<AkkaPersistenceJournalBuilder>? journalBuilder = null,
    Action<AkkaPersistenceSnapshotBuilder>? snapshotBuilder = null,
    string pluginIdentifier = "Redis",
    bool isDefaultPlugin = true);
public static AkkaConfigurationBuilder WithRedisPersistence(
    this AkkaConfigurationBuilder builder,
    Action<RedisJournalOptions>? journalOptionConfigurator = null,
    Action<RedisSnapshotOptions>? snapshotOptionConfigurator = null,
    bool isDefaultPlugin = true)
public static AkkaConfigurationBuilder WithRedisPersistence(
    this AkkaConfigurationBuilder builder,
    RedisJournalOptions? journalOptions = null,
    RedisSnapshotOptions? snapshotOptions = null
    Action<AkkaPersistenceJournalBuilder>? journalBuilder = null,
    Action<AkkaPersistenceSnapshotBuilder>? snapshotBuilder = null)

Parameters

  • configurationString string

    Connection string used for database access. Connection string as described here: https://stackexchange.github.io/StackExchange.Redis/Configuration#basic-configuration-strings.

  • mode PersistenceMode

    Determines which settings should be added by this method call. Default: PersistenceMode.Both

    • PersistenceMode.Journal: Only add the journal settings
    • PersistenceMode.SnapshotStore: Only add the snapshot store settings
    • PersistenceMode.Both: Add both journal and snapshot store settings
  • autoInitialize bool

    Should the Redis store collection be initialized automatically. Default: false

  • journalBuilder Action<AkkaPersistenceJournalBuilder>

    An Action delegate used to configure an AkkaPersistenceJournalBuilder instance. Used to configure health check.

  • snapshotBuilder Action<AkkaPersistenceSnapshotBuilder>

    An Action delegate used to configure an AkkaPersistenceSnapshotBuilder instance. Used to configure health check.

  • journalConfigurator Action<RedisJournalOptions>

    An Action delegate to configure a RedisJournalOptions instance.

  • snapshotConfigurator Action<RedisSnapshotOptions>

    An Action delegate to configure a RedisSnapshotOptions instance.

  • journalOptions RedisJournalOptions

    An RedisJournalOptions instance to configure the Redis journal store.

  • snapshotOptions RedisSnapshotOptions

    An RedisSnapshotOptions instance to configure the Redis snapshot store.

Microsoft.Extensions.Diagnostics.HealthChecks Integration

Akka.Persistence.Redis.Hosting includes built-in health check support for Redis persistence plugins through the WithHealthCheck() extension methods. These health checks integrate with Microsoft.Extensions.Diagnostics.HealthChecks to monitor the health of your Redis journal and snapshot stores.

Built-in Health Checks

All health checks are tagged with akka, persistence, and mongodb for easy filtering.

Configuring Health Checks

You can add health checks when configuring Redis persistence using the WithHealthCheck() method:

builder
    .WithRedisPersistence(
        journalOptions: new RedisJournalOptions
        {
            ConfigurationString = "your-redis-connection-string",
        },
        snapshotOptions: new RedisSnapshotOptions
        {
            ConfigurationString = "your-redis-connection-string",
        },
        journalBuilder: journal => journal.WithHealthCheck(HealthStatus.Degraded),
        snapshotBuilder: snapshot.WithHealthCheck(HealthStatus.Degraded));

Changes from Previous Version

v1.5.67v1.5.68-beta1
Added Dependencies

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.