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 8863007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:52:05+00:00 2026-06-14T15:52:05+00:00

Background There’s a message queue domain. This domain may work with some message queue

  • 0

Background

There’s a message queue domain. This domain may work with some message queue technology. In this particular case it’s bound to Windows Azure Service Bus.

Some project has an operation that registers a Windows Azure Service Bus topic (basically, a message queue).

Registering a new message queue means:

  1. Starting a domain transaction (i.e. database transaction).
  2. Adding a message queue domain object with some associated info (like what user registers it or to what application belongs the whole message queue).
  3. Using inversion of control to handle actual queue registration in message queue server (in this case it’ll happen against Windows Azure Service Bus).
  4. If nothing went wrong, domain transaction gets comitted and associated domain objects are persisted or updated.

Above background it should work fine if domain transaction ends successfully and Windows Azure Service Bus topic registration worked fine.

Issues

But what happens if domain transaction ends successfully but Windows Azure Service Bus couldn’t register the topic – aka message queue -?

Yes, you’ve a broken domain.

And what happens if you make the Windows Azure Service Bus topic registration before the domain transaction starts? Well, if everything goes fine, no problem. But now the problem has been inverted: what happens if Windows Azure Service Bus topic gets correctly registered but later the domain transaction fails?

Right, this second case is better than first described one, because the operation has registered an useless message queue but domain won’t know about it . Mainly the problem now is that an indeterminate number of transactions may fail and an unknown number of message queues would be there just for nothing.

Just imagine if this is a serious and large business service: a lot of useless message queues and a system administrator (a human) deleting useless message queues every month.

So what – now the question -?

Since I find the option of having useless message queues better than having a broken domain, I’ve opted-in on going forward on this way, but…has Windows Azure any kind of distributed transaction mechanism in order to include any remote object creation in an atomic transaction including other domain-specific operations?, If not – sadly I believe that this is the actual situation -, how would you solve this scenario?

Note:

I’m looking for something like this because I really don’t like to have a domain that can’t handle its use cases at all. I prefer to avoid this and let domain work properly and have everything in control.

Some interesting link…

I’ve found some interesting link about this topic:

http://blogs.msdn.com/b/clemensv/archive/2012/07/30/transactions-in-windows-azure-with-service-bus-an-email-discussion.aspx

  • 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-14T15:52:07+00:00Added an answer on June 14, 2026 at 3:52 pm

    You can solve this without transactions by using states. Imagine the following workflow:

    1. Register the domain and set its state to pending
    2. Create the Service Bus Topic
    3. Set the state of the domain to active

    Then you can have a small process that checks the pending domains:

    • If a domain is pending but the topic exists, set the state to active (in this case, step 3 probably failed).
    • If a domain is pending but the topic does not exist, try to recreate the topic or send an alert to someone who can do a manual check of what’s happening

    With a retry policy in place (like TOPAZ), you won’t have any issues in 99% of the requests. But whenever something goes wrong, it will get fixed automatically or it will escalate to a human intervention if it can’t be fixed.

    The alternative would be something like in Clemens’ blog post, where you use an outbox table in SQL Azure and you write to this outbox table in the same transaction where you register the domain.

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

Sidebar

Related Questions

Is there any way to do UITableView background like on this image programmatically? I
Background: There is this developer principle Should my function return null or throw an
Background: There is a table, events; this table is formatted latin1. Individual columns in
There is a background in my app, and it should be changed after some
Background: There are numerous PHP addons out there that have some nice ideas, but
Background There is a square map with some obstacles on it. Obstacles are represented
Question for ObjectiveC gurus w/ some WinAPI background: Is there support for COM-like apartment
Background: There are some values on my website which shall be editable via JavaScript
Background: There are multiple DBPArentProductKEys associated with a POG.ID. I need to count the
background: - there are formal languages for expressing programming language valid lexicon and syntax

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.