Skip to content
March 19, 2011 / kiranpatils

Basics of Sitecore Event Queue

Sitecore 6.3 got nice feature called Event Queue. This is nice article on it : http://www.sitecore.net/Community/Technical-Blogs/Getting-to-Know-Sitecore/Posts/2010/07/Introducing-the-Sitecore-Event-Queue.aspx

Updated : 10th May 2011

Was reading Forum and Adam Weber wrote nice stuff on EventQueue, which will really help you to clear your Event Queue Basics:

Here are some quick, easy steps to enable event queues and subsequently clear your CD html caches on publish:

1) Either “enable” the /App_Config/Include/ScalabilitySettings.config file by removing the .example extension and deploying it to ALL of your Sitecore instances (both CM and CD). Or, in your web.config file (or another include file) change the /sitecore/settings/EnableEventQueues setting to “true”. Then deploy your adjusted web.config to all of your Sitecore instances.

2) In your web.config file, check the /sitecore/events node and verify that you see a node similar to this:
<event name=”publish:end:remote”>
<handler type=”Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel” method=”ClearCache”>
<sites hint=”list”>
<site>website</site>
</sites>
</handler>
</event>
This handler(s) listed for this event are fired on your remote Sitecore instances (typically CD environments) after a publish operation completes. Ensure that the HtmlCacheClearer handler is in place and that the parameter contains a element with the name of the remote site you’re attempting to clear the cache for. Out of the box, the default “public” site for Sitecore is named “website”. If you’ve changed that name at all then you need to adjust the HtmlCacheClearer parameter accordingly. You can see all of the sites defined in your web.config file under the /sitecore/sites node.

Lastly, here is a brief overview of how the event queue works, assuming the ‘EnableEventQueues’ setting is true for your relevant Sitecore instances:
1) Your CM instance triggers an event, for instance “publish:end:remote”
2) This event is added to the EventQueue table in the database that is targeted by the event. For instance, the “publish:end:remote” event will be queued up in the publishing target database, typically the ‘web’ database (unless you’ve specified custom publishing targets/databases).
3) Every 2 seconds, your CD instances poll the EventQueue table in the database from which they are retrieving content. If they find an event queued up in the EventQueue table, they attempt to handle the event according to the handlers defined in the /sitecore/events section in their respective web.config files. For instance, by default the “publish:end:remote” event is configured to execute the HtmlCacheClearer handler for the “website” site. Handlers can be added or removed as needed. (Note: the interval at which your CD instances poll the EventQueue table is configurable in the web.config file under the /sitecore/eventQueue/processingInterval node)

Sitecore Scaling Guide

Happy Event Queuing! 🙂

Advertisements

13 Comments

Leave a Comment
  1. patmisan / Jun 30 2011 12:27 am

    Hi Kiran,

    I am having very strange issue you might be able to help me. i have enable event queue on 6.3 and set publish:end:remote and cleare cache. it does clear cache but some pages are update with new value but other are not why it could happen any idea?

    • kiranpatils / Jun 30 2011 8:10 am

      Hello patmisan,

      what is the pattern in those some and other pages? is there any pattern? have you tried clearing full cache from “/sitecore/admin/cache.aspx” — after this does it shows your change for other pages? Have you applied HTML Caching on your renderings?

      If all of your above questions answer is positive then read below lines:

      If I can recall right from my memory then we also faced similar issue after upgrading to Sitecore 6.3.1 and we upgraded to Released Sitecore CMS 6.3.0 rev.101029 (Update-3) Check below link:

      http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/ChangeLog/Release%20History%20SC63.aspx

      The “publish:end:remote” event was not being added to the event queue after a publishing job had completed. The HTML cache would therefore not be cleared after publishing on remote instances. (332898)

      Cheers,
      Kiran Patil

Trackbacks

  1. Publishing and Cache Clearing Basics « Sitecore basics!
  2. Why I love Sitecore? « Sitecore basics!
  3. Basic ways of troubleshooting EventQueue challenges « Sitecore basics!
  4. Exception while handling event Sitecore.Publishing.StartPublishingRemoteEvent | Sitecore basics!
  5. SYNCHRONIZATION – Part 1 – EVENT QUEUE | Sitecore
  6. SYNCHRONIZATION IN SITECORE – Part -2 LUCENE INDEXES | Sitecore
  7. Sitecore EventQueue deadlocks – how to solve them and how to avoid them | Brian Pedersen's Sitecore and .NET Blog
  8. Custom events in Sitecore using Event Queue | The Sitecore Zone
  9. Custom events in Sitecore using the Event Queue | The Sitecore Zone
  10. Reducing pressure on Sitecore Event Queue table | The Sitecore Zone
  11. Sitecore: Interview questions | Sitecore Tweaks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: