AuditFilter

Component: Audit Filter
NuGet Package NServiceBus.AuditFilter (1.x)
This is a community maintained project
Target NServiceBus Version: 7.x

Introduction

Uses the AuditFilter component to control what messages are sent to the audit queue.

Code Walk-through

This sample uses the Learning Transport and the resultant messages can be viewed in the Storage Directory.

Decorate messages with attributes

[ExcludeFromAudit]
public class MessageToExcludeFromAudit :
    IMessage
{
}
[IncludeInAudit]
public class MessageToIncludeAudit :
    IMessage
{
}

Add to EndpointConfiguration

endpointConfiguration.AuditProcessedMessagesTo("audit");
endpointConfiguration.FilterAuditQueue(
    defaultFilter: FilterResult.IncludeInAudit);

Last modified