- 3 minutes to read

DaysToKeepMessageContextDefault - System Parameter

The DaysToKeepMessageContextDefault System Parameter sets the default Days to keep Context value that Nodinite copies onto every new Message Type. The Logging Service removes the context properties (the key-value pairs logged with a Log Event) once they are older than the Message Type's own value, and keeps the event itself.

DaysToKeepMessageContextDefault set from 14 to 5 and saved, Add Message Type starting its Retention tab with Days to keep Context 5, then the Message Types list filtered on Contoso.Billing showing Contoso.Billing.Dunning (added in the form) and Contoso.Billing.Receipt (created by the Logging Service from a new event), both with Context 5 and Events and Bodies 14, animated walkthrough (7.12)
Animated walkthrough: after the value is set from 14 to 5, both ways of creating a Message Type use it. The Add Message Type form starts its Retention tab with 5, and the Logging Service gives 5 to a Message Type it creates from a new event.

  1. Filter the System Parameters list on the key and open DaysToKeepMessageContextDefault.
  2. Change the value from 14 to 5 and Save.
  3. Go to Repository > Message Types and select Add Message Type. Name it, open the Retention tab: Days to keep Context starts at 5. Save.
  4. Log an event with a Message Type that doesn't exist yet. The Logging Service creates it with Days to keep Context 5.
  5. Filter the Message Types list: both new Message Types show Context 5, while Events and Bodies keep 14.

At a Glance

Property Value
Key DaysToKeepMessageContextDefault
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 Context 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 5.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.
  • Context belongs to the event. Each Message Type has three retention values: Events, Data, and Context. Deleting an event always deletes its context, so this value only matters when it is shorter than the events value set by DaysToKeepMessageEventsDefault. A Message Type's Days to keep Context cannot exceed its Days to keep Events. Message bodies have their own value, DaysToKeepMessageDataDefault.
  • What goes and what stays. Context removal deletes the context properties described in Context Options. Search Field values are stored with the event, not with the context, so they stay searchable until the event itself is deleted.
  • Context is removed 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 added through the Web API, or through the MCP Endpoint, gets the values sent with it, not this default.

Choosing a Value

  • The default is 14 days. Keep context properties as long as users need them to troubleshoot or act on events, and for fewer days than events when the properties are large or sensitive.
  • A value of 0 makes new Message Types remove context on the next cleanup run.
  • Without this parameter, new Message Types get the DaysToKeepMessageDataDefault value for their context too.

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 Context there.

Next Steps