According to the documentation, NServiceBus persists messages via the Management Service in a RavenDB stored in C:\ProgramData\Particular\ServiceBus.Management\Data
. See Working with Error and Audit queues.
Ayende has confirmed that the database can only increase in size, never return the allocated disk space.
My problem is that the Data-file is now exceeding 20GB with +3 million messages.
Note that these messages are in the management DB, not in any of the message queue databases, which are stored in C:\Program Files\NServiceBus.Persistence.v4\Database\Databases
.
The three million messages can be viewed in ServiceInsight, but I cannot delete them. All MSMQ queues are empty, and the queue-databases are around 1MB in size.
Question: How can I purge the Management Service / Particular Management database?
Sub-question: How can I prevent this form happening again? Is there a setting I'm missing?