Skip to content

Akka.Persistence.Azure v1.5.0

Compare
Choose a tag to compare
@Aaronontheweb Aaronontheweb released this 03 Mar 03:30
899b232

1.5.0 March 02 2023

0.9.2 September 27 2022

0.9.1 August 29 2022

New Setup classes are added to allow programmatic setup of the journal table and snapshot-store blog storage; these setup classes supports DefaultAzureCredential. Note that to use DefaultAzureCredential from the Azure.Identity package, you need to provide both service URI and credential.

var host = new HostBuilder()
    .ConfigureServices(collection =>
    {
        collection.AddAkka("MyActorSys", builder =>
        {
            var credentials = new DefaultAzureCredential();
            
            // Programatically setup the journal table
            builder.WithAzureTableJournal(setup => {
                setup.TableName = "myazuretable";
                setup.ServiceUri = new Uri("https://{account_name}.table.core.windows.net");
                setup.DefaultAzureCredential = credentials;
                // Optional TableClientOptions
                setup.TableClientOptions = new TableClientOptions(); 
            });
            
            // Programatically setup the snapshot-store blob container
            builder.WithAzureBlobsSnapshotStore(setup => {
                setup.ContainerName = "myAzureBlobContainer";
                setup.ServiceUri = new Uri("https://{account_name}.blob.core.windows.net");
                setup.DefaultAzureCredential = credentials;
                // Optional BlobClientOptions
                setup.BlobClientOptions = new BlobClientOptions(); 
            });
            
            builder.StartActors((system, registry) =>
            {
                var myActor = system.ActorOf(Props.Create(() => new MyPersistenceActor("ac1")), "actor1");
                registry.Register<MyPersistenceActor>(myActor);
            });
        });
    }).Build();

A few convenience Akka.Hosting extension methods are also added as a shortcut:

var host = new HostBuilder()
    .ConfigureServices(collection =>
    {
        collection.AddAkka("MyActorSys", builder =>
        {
            var credentials = new DefaultAzureCredential();
            
            // Add the journal table
            builder.WithAzureTableJournal(
                serviceUri: new Uri("https://{account_name}.table.core.windows.net"),
                defaultAzureCredential: credentials);
            
            // Add the snapshot-store blob container
            builder.WithAzureBlobsSnapshotStore(
                serviceUri: new Uri("https://{account_name}.blob.core.windows.net"),
                defaultAzureCredential: credentials);
            
            builder.StartActors((system, registry) =>
            {
                var myActor = system.ActorOf(Props.Create(() => new MyPersistenceActor("ac1")), "actor1");
                registry.Register<MyPersistenceActor>(myActor);
            });
        });
    }).Build();

0.9.0 July 21 2022

Added Akka.Hosting support to Akka.Persistence.Azure, which you can activate via the following:

First, install the Akka.Persistence.Azure.Hosting NuGet package:

PS> install-package Akka.Persistence.Azure.Hosting

Next, add the WithAzurePersistence method calls to your AkkaConfigurationBuilder (from Akka.Hosting):

var conn = Environment.GetEnvironmentVariable("AZURE_CONNECTION_STR");
var host = new HostBuilder()
    .ConfigureServices(collection =>
    {
        collection.AddAkka("MyActorSys", builder =>
        {
        	// enables both journal and snapshot store
            builder.WithAzurePersistence(conn);
            builder.StartActors((system, registry) =>
            {
                var myActor = system.ActorOf(Props.Create(() => new MyPersistenceActor("ac1")), "actor1");
                registry.Register<MyPersistenceActor>(myActor);
            });
        });
    }).Build();

await host.StartAsync();
return host;

You can also call the following methods to activate the journal / snapshot stores independently:

  • WithAzureTableJournal
  • WithAzureBlobsSnapshotStore

0.8.4 June 2 2022

0.8.3 September 9 2021

0.8.2 April 20 2021

Release of Akka.Persistence.Azure

Changes:

  • 899b232 upgraded Akka.Persistence.Azure to Akka.NET v1.5 (#290)
  • 1c912b9 Bump Docker.DotNet from 3.125.12 to 3.125.13 (#289)
  • 4df4bb0 Update Akka.NET and Akka.Hosting to 1.5.0-beta6 (#288)
  • 5f234cb Bump Microsoft.NET.Test.Sdk from 17.4.1 to 17.5.0 (#286)
  • 0ca81c9 Add options support to hosting extensions (#285)
  • 5d8dbc7 Centralized NuGet Package Management (#284)
  • b61bcf7 Bump Azure.Data.Tables from 12.7.1 to 12.8.0 (#281)
  • 4db81a8 Bump Azure.Identity from 1.8.1 to 1.8.2 (#283)
  • e608066 Bump Akka.Persistence.Hosting from 1.0.2 to 1.0.3 (#282)
  • dad9c90 Bump Akka.Persistence.Hosting from 1.0.1 to 1.0.2 (#280)
See More
  • 7e6eefa Bump AkkaVersion from 1.4.48 to 1.4.49 (#279)
  • 5d20838 Bump AkkaVersion from 1.4.47 to 1.4.48 (#276)
  • 7e17c60 Bump Akka.Persistence.Hosting from 1.0.0 to 1.0.1 (#277)
  • 2bc9a94 Bump Azure.Identity from 1.8.0 to 1.8.1 (#278)
  • bf0d27b Bump Akka.Persistence.Hosting from 0.5.1 to 1.0.0 (#275)
  • 9c67978 Bump Microsoft.NET.Test.Sdk from 17.4.0 to 17.4.1 (#274)
  • 0d2ecf6 Bump Azure.Data.Tables from 12.6.1 to 12.7.1 (#271)
  • 7aeb0ad Bump Azure.Identity from 1.7.0 to 1.8.0 (#268)
  • 7f670c7 Bump AkkaVersion from 1.4.45 to 1.4.47 (#273)
  • a05ad8c Bump Microsoft.NET.Test.Sdk from 17.3.2 to 17.4.0 (#267)
  • dc47207 Bump Akka.Persistence.Hosting from 0.5.0 to 0.5.1 (#266)
  • 4aab951 Bump AkkaVersion from 1.4.44 to 1.4.45 (#264)
  • 2115860 Bump AkkaVersion from 1.4.43 to 1.4.44 (#263)
  • d98cd75 Bump Akka.Persistence.Hosting from 0.4.3 to 0.5.0 (#261)

This list of changes was auto generated.