Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8545737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:51:40+00:00 2026-06-11T12:51:40+00:00

I have a simple process which reads from one queue, processes the messages, and

  • 0

I have a simple process which reads from one queue, processes the messages, and outputs to another. I am trying to wrap this transfer within a TransactionScope, such that both the read from the input queue, and the write to the output queue occurs within the same transaction.

However, it would appear that MSDTC is being used to conduct this transaction, and as a result it is significantly slower than using a standard MessageQueueTransaction. Should this be happening? I was under the impression that TransactionScope would only elevate to an external transaction if the scope involved, for instance, a message queue read, and a database write, but not if just multiple message queues were involved.

Thanks.

EDIT: This is all on my laptop at the moment, so I am sure that no other machines are involved.

I also want to add that I’m confirming that an escalated transaction is taking place by checking in Windows’ ‘Component Services’ snap-in (i.e. the Local DTC / Transaction List). I can see the transactions entering and leaving this screen, which I assume means that the transaction has been escalated. Am I wrong in assuming this?

EDIT 2: I’m getting the same behaviour when I am just writing to a single queue! i.e.

using (var ts = new TransactionScope())
{
    using (var q = new MessageQueue("..."))
    {
        /* write data */
    }

    ts.Complete();
}

I can see the DTC being used with the above, despite the queue being on the local machine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:51:41+00:00Added an answer on June 11, 2026 at 12:51 pm

    It seems TransactionScope only handles external transactions in respect to message queues. You have to use MessageQueueTransaction if you want it to be internal only. This works differently with SQL transactions where the transaction is only escalated if required, which is what confused me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic/simple need to create a pipeline transfer process from one SQL
I have a simple script, which tries to kill an already running process. I
Let's say I want to have a function which reads data from the SerialPort
Consider we have a simple cycling Javascript process as: function test() { el=document.getElementById("test"); var
I have what may be a very simple question. I want to process a
I have simple class with width and height member fields which define number of
I have simple database - one table with 6 collumns. 3 of them i
I have a parent and child process, and the parent can read output from
I have a taskBarIcon element extending Application Context from which my entire UI is
I've got an event-driven network server program. This program accepts connections from other processes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.