DaysToKeepMessageEventsDefault - System Parameter
The DaysToKeepMessageEventsDefault System Parameter sets the default Days to keep Events value that Nodinite copies onto every new Message Type. The Logging Service deletes processed Log Events once they are older than their Message Type's own value.

Animated walkthrough: after the value is raised from 14 to 30, a Message Type that the Logging Service creates from a new event gets 30 days for its events. The Message Type that already existed keeps 14.
At a Glance
| Property | Value |
|---|---|
| Key | DaysToKeepMessageEventsDefault |
| Data type | integer (days) |
| Default | 14 |
| Read by | Logging Service, when it creates a Message Type from a new event; Web Client, to pre-fill Days to keep Events in Add or manage Message Type |
| Takes effect | About 15 seconds, for Message Types created after the change (up to 5 minutes for Message Types the BizTalk Endpoint sync creates); no restart needed |
| Status | ✅ Active |
| Since | Nodinite 3 |
How It Works
- A seed, not a live setting. Nodinite copies the value onto a Message Type only when the Message Type is created. Changing the parameter never changes existing Message Types; adjust those one at a time in Add or manage Message Type.
- Events own their body and context. Each Message Type has three retention values: Events, Data (the message body), and Context (the key-value context properties). When the cleanup run deletes a Log Event, it deletes the event's body and context with it. DaysToKeepMessageDataDefault and DaysToKeepMessageContextDefault let you remove body and context earlier, so keep both at or below this value.
- Only processed events are deleted, on each cleanup run of the Logging Service (see CleanUpTimerInterval). The full retention pipeline is described in the Logging Service Data Retention section.
- The Web API applies no default. A Message Type created with
POST api/MessageTypesstores the retention values the caller sends, so a script must send them itself. - No restart. The Logging Service and the Add form read a changed value within about 15 seconds.
Choosing a Value
- The default
14days suits most environments. Raise the value on the Message Types that need a longer history instead of raising the default for all of them. - A value of
0makes new Message Types delete their events on the next cleanup run. - An empty value makes new Message Types keep their events forever. A negative value, a value that isn't a whole number, or a missing parameter gives the default
14. - If you log more than you delete, the Log Database keeps growing until it slows down or the disk is full. Nodinite starts new Log Databases when one becomes too old (DaysToSplitDatabaseOn) or too large (SizeToSplitDatabaseOn), but the disk space for retained data is still yours to manage.
Tip
Use the Nodinite Database Monitoring Agent to get alerts when databases grow too large and the Windows Server Monitoring Agent to get alerts before you run out of disk space.
Frequently Asked Questions
I changed the value. Why are my existing Message Types unchanged?
Because the value only seeds Message Types at creation time. Open each existing Message Type in Add or manage Message Type and change its Days to keep Events there.