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

Use isolated dispatch for control message to prevent attaching to outbox's transaction scope if transport supports transaction scopes #403

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SzymonPobiega
Copy link
Member

@SzymonPobiega SzymonPobiega commented Jan 10, 2025

Aims to solve #398

For correctness the control message should be dispatched immediately when requested and not be part of any transaction.

Some transports, like SQLT, attach to any contextual TransactionScope in the dispatcher. This creates issues when the persistence used supports TransactionScope mode outbox because in that case the scope is present then the transaction session is about to dispatch the control message.

These seems to be no easy way to test this change in the TransactionalSession repo so I added a test to the SQLP repo Particular/NServiceBus.Persistence.Sql#1672

…box's transaction scope if transport supports transaction scopes
@danielmarbach
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants