Event Model - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

The event model in Content Services is a library packaged as a JAR file, which is part of the repository (i.e. alfresco.war). The library contains the event model and the databind helpers used to help the clients to marshall and unmarshall the events.

The event model is based on the CloudEvents specification. CloudEvents is a specification for describing event data in common formats to provide interoperability across services, platforms and systems. For more information see CloudEvents Primer.

The Content Services event payload (i.e. the part of transmitted data that is the actual intended message) consist of two parts. The CloudEvent attributes and the Content Services event attributes.

{
  CloudEvent standard attributes...
  "data": {
    Content Services custom event attributes... 
  }

}

Basic configuration of the event system is in the repository.properties file:

### Repository events2
#
# Type and aspect filters which should be excluded.
# Note: System folder node types are added by default.
repo.event2.filter.nodeTypes=sys:*, fm:*, cm:thumbnail, cm:failedThumbnail, cm:rating, rma:rmsite include_subtypes
repo.event2.filter.nodeAspects=sys:*
repo.event2.filter.childAssocTypes=rn:rendition
#
# Comma separated list of users which should be excluded
# Note: username's case-sensitivity depends on the {user.name.caseSensitive} setting
repo.event2.filter.users=System, null
#
# Topic name
repo.event2.topic.endpoint=amqp:topic:alfresco.repo.event2

Any custom configuration, to for example the default event filtering, can be done in alfresco-global.properties.

It is possible to disable the events from being triggered and sent to ActiveMQ by setting repo.event2.enabled=false. This setting prevents any behaviors from being bound to the node creation/update/delete and permission changes.