NServiceBus.Persistence.Sql 7.0.2 and 6.6.4 – Patch releases available

Hi everyone,

We’ve just released NServiceBus.Persistence.Sql 7.0.2 and 6.6.4.

Fixed bugs

  • #1198 Transport and user operations are not committed when the transactional session is committed

How to know if you are affected

You are affected if:

  • You are using the transactional session
  • You are configuring the outbox to use transaction scope with outbox.UseTransactionScope();

Symptoms

The outbox transaction is not committed when the transactional session is committed. Instead, it is committed when the outbox transaction is disposed of.

This problem cannot be observed in a regular message handling pipeline because the outbox transaction is disposed of immediately after it is committed.

The transactional session, however, is committed and disposed of by the user or by middleware, which may allow an opportunity to observe that the transport and user operations are not committed after transactional session is committed.

using var scope = serviceProvider.CreateScope();
using var transactionalSession = scope.ServiceProvider.GetRequiredService<ITransactionalSession>();
await transactionalSession.Open(new SqlPersistenceOpenSessionOptions());
await transactionalSession.Send<IMyCommand>(_ => { });
await transactionalSession.Commit();
// the command is not yet sent— it will only be sent when the transactional session is disposed of

When to upgrade

You should upgrade during your next maintenance window if you are affected.

Where to get it

You can install the new versions of NServiceBus.Persistence.Sql from NuGet.

With thanks,
The team in Particular

Please read our release policy for more details.