NServiceBus.Persistence.Sql icon indicating copy to clipboard operation
NServiceBus.Persistence.Sql copied to clipboard

SQL Dialect: Ability to opt-out of padding logic

Open ramonsmits opened this issue 1 year ago • 0 comments

Describe the feature.

Currently the SQL dialect will always apply padding logic in all SQL environments

  • https://github.com/Particular/NServiceBus.Persistence.Sql/blob/master/src/SqlPersistence/Outbox/SqlDialect_MsSqlServer.cs#L85

Some users want to opt-out of this behavior and prefer the "varchar values out of the row" table option.

exec sp_tableoption N'MyTable', 'large value types out of row', <'ON' or 'OFF'>

For example via a dialect configuration option:

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

Additional Context

No response

ramonsmits avatar Jun 02 '24 10:06 ramonsmits