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

Perform connection string validation when connection is shared with Sql Server or PostgreSQL transport #1499

Open
tmasternak opened this issue Jun 27, 2024 · 0 comments

Comments

@tmasternak
Copy link
Member

Describe the suggested improvement

Description

When used with SQL Server transport, the persistence will, by default, try to reuse connections and transactions managed by the transport.

This will happen whether the connection string configured for the persistence matches the transport connections string or not. In such cases, the users might be confused about where their data (e.g. sagas) is stored.

Describe the suggested solution

Validation

Validate if the connection string configured in the persistence matches the one configured for the transport. If the connection strings are different ensure the users calls (to prevent the connection sharing):

var persistence = endpointConfiguration.UsePersistence<SqlPersistence>();
var dialect = persistence.SqlDialect<SqlDialect.MsSqlServer>();
dialect.DoNotUseSqlServerTransportConnection();

Documentation updates

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant