Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Host.Outbox] Support for nested transactions #218

Closed
szczupi opened this issue Mar 12, 2024 · 1 comment · Fixed by #229
Closed

[Host.Outbox] Support for nested transactions #218

szczupi opened this issue Mar 12, 2024 · 1 comment · Fixed by #229
Assignees
Milestone

Comments

@szczupi
Copy link

szczupi commented Mar 12, 2024

In our setup, we use Outbox for Azure Service Bus and Sql transactions for in-memory bus.

`mbb
    .AddChildBus("Command", x => x.WithProviderMemory()
        .UseSqlTransaction())
    .AddChildBus("AzureSB", x =>
    {
        x.WithProviderServiceBus(
            cfg =>
            {
            });
        x.UseOutbox();
    })
    .AddOutboxUsingDbContext<TContext>(x => { });`

In one of the use cases, we'd like to send a message from one request handler that will be handled by another 'In memory' request handler. Unfortunately, the outbox is trying to span a new SQL Transaction, although one already exists, which ends up with an exception.
Is it possible to discover and use existing transactions when invoking the "nested" request handler?

@zarusz
Copy link
Owner

zarusz commented Apr 1, 2024

Nested transactions are now supported since this release:
https://www.nuget.org/packages/SlimMessageBus.Host.Outbox.DbContext/2.3.0-rc5
https://www.nuget.org/packages/SlimMessageBus.Host.Outbox.Sql/2.3.0-rc5

The 2.3.0 version will be released soon.

@zarusz zarusz changed the title [Transactions] Support for nested transactions [Host.Outbox] Support for nested transactions Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants