0

I've been using the MassTransit v8.0.13 Transactional Outbox for a few months, but now I'm wondering about the default transactional level set on it. I'm using Postgres and when I setup the Transactional Outbox, by default it sets the isolation level of all the consumers to Repeatable Read.

Someone knows if there is a reason to use this level? If I change the isolation level to Read Commited will I lose something of the outbox?

JoaoVelho
  • 17
  • 2

1 Answers1

0

The settings are chosen for a reason, to ensure transaction isolation between concurrently delivered messages that may target the same consumer, saga, etc.

You can change whatever you want, but if it breaks, the change is the likely culprit.

Why would you want to change it?

Chris Patterson
  • 28,659
  • 3
  • 47
  • 59
  • I've been getting too many expections logs like "MassTransit.EntityFrameworkCoreIntegration.BusOutboxDeliveryService[0] ProcessMessageBatch faulted System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. ---> Npgsql.PostgresException (0x80004005): 40001: could not serialize access due to concurrent update". That's why I was considering changing the isolation level. But besides the exceptions I don't think there is an actual problem. And makes sense leaving the way it is as you explained – JoaoVelho Apr 05 '23 at 15:31
  • Consider only running a single instance of the bus delivery service, monitor uptime, that will reduce conflicts. – Chris Patterson Apr 06 '23 at 01:13