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

  • Home
  • SEARCH
  • 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 7880399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:08:12+00:00 2026-06-03T04:08:12+00:00

We have an Audit Message Handler and if any exceptions are thrown within this

  • 0

We have an Audit Message Handler and if any exceptions are thrown within this handler we would like it to send a log message to the LogMessageInputQueue which will be handled by another Message Handler.

Is it possible to send a new message from within an NServiceBus host process? The AuditMessageHandler accepts the handlers IBus in its constructor, but when calling

_bus.Send(new LogFatalMessage(ex));

No exception is thrown, but the message does not appear on the LogMessageInputQueue and seems to simply disappear…

All the handlers and Queues are on the same 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-03T04:08:13+00:00Added an answer on June 3, 2026 at 4:08 am

    OK, figured this out all by myself 🙂

    After the _bus.Send(new LogFatalMessage(ex)) we re-throw the original error, this causes NServiceBus to rollback its transaction and remove the message from the LogMessageInputQueue.

    By wrapping the _bus.Send() in its own transaction, we stop the rolling back of the NServiceBus transaction from removing the LogMessage from the Queue.

    using (var ts = new TransactionScope(TransactionScopeOption.RequiresNew))
    {
        _bus.Send(new LogFatalMessage(ex));
        ts.Complete();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table called 'Audit' in SQL Server 2005 like this: Name |
I have this code to send an SMS message with an attachment that is
I have an Message Driven Bean, which receives Audit messages. These messages also have
I have a SIP messsage.And I must take some parameter this SIP message. SIP
I have this code to send an emai with an audio attachment that is
We have audit columns set by triggers. For obscure security reasons predating my tenure
I have an audit record table that I am writing to. I am connecting
I have certain initializing functions that I use to set up audit logging on
I have many domain classes in my application an for Audit logging I need
I have a quick question. I'm have a db an audit Table with a

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.