zarusz / SlimMessageBus

Lightweight message bus interface for .NET (pub/sub and request-response) with transport plugins for popular message brokers.
Apache License 2.0
467 stars 78 forks source link

Sql outbox - suppress transactions for all OutboxSendingTask operation #283

Closed EtherZa closed 2 months ago

EtherZa commented 2 months ago

Suppress transactions for all queries related to the OutboxSendingTask and OutboxLockRenewalTimer classes.

Promotion to distributed transactions is being experienced with the #282 build and should not occur as locks are managed outside of transactions.

[xUnit.net 00:01:07.39] [08:10:42 DBG] SlimMessageBus.Host.Outbox.OutboxForwardingPublishInterceptor Forwarding published message of type CustomerCreatedEvent to the outbox
[xUnit.net 00:01:07.39] [08:10:42 ERR] Microsoft.EntityFrameworkCore.Update An exception occurred in the database while saving changes for context type 'SlimMessageBus.Host.Outbox.DbContext.Test.DataAccess.CustomerContext'.
[xUnit.net 00:01:07.39] System.PlatformNotSupportedException: This platform does not support distributed transactions.
[xUnit.net 00:01:07.39] at System.Transactions.Oletx.OletxTransactionManager.CreateTransaction(TransactionOptions options)
[xUnit.net 00:01:07.39] at System.Transactions.TransactionStatePromoted.EnterState(InternalTransaction tx)
[xUnit.net 00:01:07.39] at System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
[xUnit.net 00:01:07.39] at System.Transactions.Transaction.Promote()

I have also increased the timeout of the KafkaMessageBusIt.BasicReqResp test from 10 seconds from 5 seconds. Topology provision on local containers is failing to complete within the original timeout.

zarusz commented 2 months ago

All good @EtherZa. Thanks for looking into this tough.