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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:21:42+00:00 2026-05-19T09:21:42+00:00

I’m building a web site that sends commands to other endpoints in order to

  • 0

I’m building a web site that sends commands to other endpoints in order to
effect changes in the domain. In the event that a command fails for a business
reason, I’d like to be able to use Bus.Reply() and send a command failure message
to an endpoint at the ReturnAddress specified in the TransportMessage.

In attempting to accomplish this, I’ve set up the MsmqTransportConfig in my
web.config to have the appropriate InputQueue value; the Bus.Reply() call then works
correctly. However, when the reply is received in the specified queue, the web
site proceeds to consume it, which is not what I want to happen; I have another endpoint listening to the same queue to consume these events.

Is there a way to have NServiceBus use the ReturnAddress header on the sent
message, or a way to instruct a process not to pay attention to the
iput queue specified in MsmqTransportConfig, or a way to set the ReturnAddress value programatically on the TransportMessage?

  • 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-05-19T09:21:43+00:00Added an answer on May 19, 2026 at 9:21 am

    It turns out it is possible to do this. Here is the configuration block I ended up using:

    var config = Configure.WithWeb().StructureMapBuilder(ObjectFactory.GetInstance<IContainer>()).XmlSerializer();
    config.UnicastBus().MsmqTransport();
    config.Configurer
        .ConfigureComponent<MsmqTransport>(ComponentCallModelEnum.Singleton)
        .ConfigureProperty(t => t.InputQueue, "MyReturnQueue");
    config.CreateBus().Start();
    

    I haven’t looked through the code yet to figure out exactly what is happening, but it appears that if there is not an MsmqTransportConfig entry in the web.config file, the transport will not listen on its input queue. So by setting the InputQueue property programatically before the bus is created, the ReturnAddress of the TransportMessage gets populated, but the bus does not consume messages at that address.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I

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.