0

Actually, I need to know the significance of the properties related to event queue agent configuration, below is an example of the agent configuration.


1
[hh:mm:ss]

My Understanding:

  1. Interval: How often we need to run the cleanup agent task, the default value is 4 hours.
  2. DaysToKeep: The number of days you want to keep entries in the event queue, means at any moment, we keep events that got created within the past 24 hours(here if the value is 1 day).
  3. IntervalToKeep: This is the property if we need to keep events in the queue for hours/minutes/seconds, this property overrides the DaysToKeep property.

eg: If Interval is 4hours, DaysToKeep is 1 day, then the cleanup agent will run every 4 hours and it will clean all the events from the queue which are a day older, as property, DaysToKeep value is 1 which states that we have to keep all the event which are not yet 1 day older.

But when I looked into the event queue table then I found that the cleanup agent runs every 4 hours and its cleans all the records which are older than 4 hours. So my confusion is that what is the significance of property called DaysToKeep, why events got cleaned by agents which are older than 4 hours.

For reference : Link of Sitecore document about these event queue properties, https://doc.sitecore.com/developers/90/platform-administration-and-architecture/en/clean-up-the-eventqueue-and-publishqueue-tables.html

4

Your understanding is correct, DaysToKeep parameter is used only if IntervalToKeep is not specified. The interval parameter tells Sitecore how often the CleanupEventQueue agent should wake up to check if there are any events to remove. For example, if your Sitecore application process started at 00:00 today, the cleanup agent will run at about 04:00 and will remove any events that are older than 1 day, i.e. created before 04:00 yesterday. This process will be repeated every 4 hours. Please note that EventQueue table stores datetime values in UTC so they may be different from your local timezone.

I have a website on Sitecore 9.0 Update-2 and the cleanup agent works as expected with the standard configuration - it keeps 1 day of events in the EventQueue tables:

<agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel" method="Run" interval="04:00:00">
  <DaysToKeep>1</DaysToKeep>
</agent>

If you have other Sitecore servers or roles in this environment and they are connected to the same database, then it is possible that they have IntervalToKeep parameter specified and clean EventQueue records more frequently.

2
  • Thanks Anna for going through it, yeah this part is I am already clear which you specified. But I need to know about the Interval and DaystoKeep parameters. In my system Interval is 4 hours and DaysToKeep is 1 day, but still, I can see that the event queue is getting cleaned the events records which are not a day older like 6 hours old only, then what is the significance of the DaysToKeep parameter with value as 1 day.
    – Nash
    Jul 5 at 16:28
  • The "interval" parameter tells Sitecore how often the CleanupEventQueue agent should wake up to check if there are any events to remove. For example, if your Sitecore application process started at 00:00 today, the cleanup agent will run at about 04:00 and will remove any events that are older than 1 day, i.e. created before 04:00 yesterday. Please note that EventQueue table stores datetime values in UTC so they may be different from your local timezone.
    – Anna Gevel
    Jul 6 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.