The outbox feature requires persistence in order to store the messages and enable deduplication.
To keep track of duplicate messages, the NHibernate implementation of outbox requires the creation of
The NHibernate implementation by default keeps deduplication records for 7 days and runs the purge every minute.
The default settings can be changed by specifying new defaults in the config file using TimeStamp strings:
<appSettings> <add key="NServiceBus/Outbox/NHibernate/TimeToKeepDeduplicationData" value="7.00:00:00" /> <add key="NServiceBus/Outbox/NHibernate/FrequencyToRunDeduplicationDataCleanup" value="00:01:00" /> </appSettings>
By specifying a value of
-00:00:001 (i.e. 1 millisecond, the value of
Timeout.) for the
NServiceBus/ appSetting, the cleanup task is disabled. This can be useful when an endpoint is scaled out and instances are competing to run the cleanup task.