I'm trying to replace RDB with SQL server but I get this exception when processing message.
EXCEPTION OCCURRED:NHibernate.TransactionException: Begin failed with SQL exception ---> System.InvalidOperationException: SqlConnection does not support parallel transactions.
This is my Endpoint config
public class EndpointConfig : IConfigureThisEndpoint, AsA_Worker
{
public void Customize(BusConfiguration configuration)
{
LogManager.Use<NLogFactory>();
var endpointName = GetType().Namespace;
configuration.EndpointName(endpointName);
configuration.AssembliesToScan(AllAssemblies.Except("SagaProcessing.vshost.exe"));
configuration.Conventions().DefiningEventsAs(t => typeof (IDomainEvent).IsAssignableFrom(t));
configuration.Conventions().DefiningMessagesAs(t => typeof (IDomainMessage).IsAssignableFrom(t));
configuration.Conventions().DefiningCommandsAs(t => typeof (IDomainCommand).IsAssignableFrom(t));
configuration.UseTransport<SqlServerTransport>();
configuration.EnableInstallers();
configuration.UseSerialization<JsonSerializer>();
configuration.Transactions().Enable();
configuration.Transactions().DisableDistributedTransactions();
configuration.UsePersistence<NHibernatePersistence>()
.For(Storage.Subscriptions,
Storage.Timeouts,
Storage.Sagas,
Storage.Outbox);
configuration.EnableOutbox();
}
}
If I remove the Outbox feature I get this exception instead.
EXCEPTION OCCURRED:System.InvalidOperationException: ExecuteNonQuery requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized.
I found
this issue, that has the same behaviour but its status is Closed.
Attached are the full stacktraces.
NSB versions
<package id="NServiceBus" version="5.1.2" targetFramework="net451" />
<package id="NServiceBus.Azure" version="6.1.3" targetFramework="net451" />
<package id="NServiceBus.Hosting.Azure" version="6.1.3" targetFramework="net451" />
<package id="NServiceBus.Hosting.Azure.HostProcess" version="6.1.3" targetFramework="net451" />
<package id="NServiceBus.NHibernate" version="6.0.1" targetFramework="net451" />
<package id="NServiceBus.NLog" version="1.0.0" targetFramework="net451" />
<package id="NServiceBus.SqlServer" version="2.0.2" targetFramework="net451" />
Any guidance?