Contents
|
Auditing with NServiceBus
The scalability inherent in parallel message-driven systems
For these reasons, NServiceBus provides message auditing Configuring AuditingIn 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:
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 StepsLearn more about how logging works in NServiceBus. |