Activity Stream Plugin

The Activity Stream plugin provides APIs to store wiki events in the activitystream_events table. This way the runtime processing of heavy XWiki documents is avoided. Events can be filtered by:

  • wiki or space
  • the name of the activity stream they have been recorded to
  • the user that has triggered the record 

To learn more about these parameters and how to customize the Activity Stream, check the documentation page about the Activity Stream macro. Also, the source code is available on GitHub.

The Activity Stream plugin has a dedicated section in the xwiki/WEB-INF/xwiki.cfg configuration file which allows you to decide whether to store the events for each wiki in its own database or into the main wiki database. By default, both options are enabled.

You can also set the number of days to keep the events in the database. The default value is 0 which means the events are kept forever.

#-# [Since 2.0RC1]
#-# Activity Stream plugin. 
#-# The Activity Stream plugin stores data in a dedicated table in the database. Each wiki has its own database.
#-# The plugin can be configured to store its data into the database corresponding to the wiki, into the main database
#-# (default: xwiki) or both. These options should not be both set to 0 (in this case the local store will be forced).
#-# Important note: disabling storage in the main store will prevent the watchlist from retrieving events from subwikis.
#-# Default: 1 
# xwiki.plugin.activitystream.uselocalstore=1
#-# Default: 1
# xwiki.plugin.activitystream.usemainstore=1
#-# Number of days the events should be kept (0 or any negative value: infinite duration)
#-# Note: if this value is greater than 0 a scheduler job will be created, this job will then be fired every week to
#-# delete events older than the configured value.
#-# Default: 0
# xwiki.plugin.activitystream.daystokeepevents=0

The Activity Stream plugin is enabled by default in XWiki, so you will find it in the "xwiki.plugins" list of the xwiki.cfg file:

  com.xpn.xwiki.plugin.activitystream.plugin.ActivityStreamPlugin, \

The custom Hibernate mapping is also activated by default in the WEB-INF/hibernate.cfg.xml file, under your database standard XWiki configuration. If you are using MySQL, the corresponding line is <mapping resource="activitystream.hbm.xml"/>


Related Pages

Trying to decide between Cloud and On Premise? See the comparison on the XWiki Help Center.

Search this space