Skip to content

Akka.Persistence.Sql v1.5.28

Compare
Choose a tag to compare
@Aaronontheweb Aaronontheweb released this 09 Sep 16:26
5f35062

1.5.28 September 9th 2024

Linq2Db DataOptions Support

You can now use DataOptions to set up your persistence journal, read journal, and snapshot store with a new Akka.Persistence.Sql.Hosting API.

Here is an example of setting up persistence on PostgreSQL using NpgsqlDataSource instead of the previous connection string and provider name setup.

var dataSource = new NpgsqlDataSourceBuilder(_myConnectionString).Build();

var dataOptions = new DataOptions()
    .UseDataProvider(DataConnection.GetDataProvider(ProviderName.PostgreSQL, dataSource.ConnectionString))
    .UseProvider(ProviderName.PostgreSQL)
    .UseConnectionFactory((opt) => dataSource.CreateConnection());
    
var host = new HostBuilder()
    .ConfigureServices((context, services) => {
        services.AddAkka("my-system-name", (builder, provider) =>
        {
            builder.WithSqlPersistence(dataOptions);
        });
    });

Changes:

See More
  • 397fbbc build(deps): bump jetbrains.resharper.globaltools (#443)
  • 974c537 Harden SQL journal and snapshot store against initialization failures (#444)
  • 9b67712 build(deps): bump BenchmarkDotNet from 0.13.12 to 0.14.0 (#433)
  • 69d3753 build(deps): bump jetbrains.resharper.globaltools (#431)

This list of changes was auto generated.