Modular Monolith architecture gives MSDTC problem

110 Views Asked by At

I am working on breaking up large spagetti-syle system written in .net/c# into smaller pieces. First step is to break up the app into components (c# classes in separate projects using their own storage) each working on it's own database or at minimum their own schema in MS SQL Server 2016 database. Each component uses their own connection string (different username).

When one component calls another (e.g. invoicing component needs to ask warehouse component for some data) we escalate immediately to MSDTC, which I am trying to avoid. I think the problem is multiple connection strings (transaction scope suppression does not help). However I want the components to use different connection strings and I think other components should not be aware what connection strings/databases etc. the other component is using.

Is there a way to have components with different connection strings and not escalate to MSDTC? Main thing I am trying to achieve is separation of concerns between modules..

EDIT: I am not trying to do cross-component transaction. I don't need transaction in this case.

0

There are 0 best solutions below