NServiceBus Home

Contents

  • Long-Running Processes
  •     Sagas

Auditing with NServiceBus

Auditing

The scalability inherent in parallel message-driven systems
makes them more difficult to debug than their sequential,
synchronous and centralized counterparts.

For these reasons, NServiceBus provides message auditing
built-in to every endpoint. All you need to do is tell
NServiceBus where you want to send those messages.

Configuring Auditing

In order to turn on auditing, all you have to do is to add the attribute "ForwardReceivedMessagesTo" to the UnicastBusConfig section of an endpoint's configuration file as shown below:

Configuring auditing

The above configuration will cause all messages arriving at the given endpoint to be forwarded to the queue called "AuditQueue" on the machine called "AdminMachine". You can specify any queue on any machine, though only one is supported. Of course, you can forward on from that machines as well.

What you choose to do with those messages is now up to you - you can save them in a database, do some custom logging, anything.

The important thing is that you now have a centralized record of everything that's happening in your system while maintaining all the benefits of keep things distributed.

Next Steps

Learn more about how logging works in NServiceBus.



Legal

“NServiceBus” is among the trademarks of NServiceBus Ltd. All other product and company names and marks mentioned are the property of their respective owners and are mentioned for identification purposes only.

© 2010 NServiceBus Ltd. All rights reserved.