Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RELEASE_NOTES.md for 1.5.28 release #457

Merged

Conversation

Arkatufus
Copy link
Contributor

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);
        });
    });

@Aaronontheweb Aaronontheweb merged commit 5f35062 into akkadotnet:dev Sep 9, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants