Skip to content

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

@tmasternak

Description

@tmasternak

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions