Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

AEM Sling Content Distribution Event Listener

Avatar

Level 6

Hi All,

 

As AEM as a Cloud Service is based on Sling Content Distribution mechanism, are there any references on how to create a custom event handler that can capture the content distribution event and whether it was an ADD or a DELETE that was triggered?

 

I am going through the sling documentation but if there is anyone who has already done this, would appreciate your support.

 

Thanks,

Ram

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
 
 

Hi @rampai ,

 

The Sling event handler can be utilized for this requirement which is org.osgi.service.event.EventHandler.

Eventually we are touching the node (ADDED/REMOVED, etc) and sling event will be able to capture that. In handler itself you can check the type of event.

 

You can watch this video for more understanding.

Git - https://github.com/riteshmittal/aemscheduler-even-handling

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor
 
 

Hi @rampai ,

 

The Sling event handler can be utilized for this requirement which is org.osgi.service.event.EventHandler.

Eventually we are touching the node (ADDED/REMOVED, etc) and sling event will be able to capture that. In handler itself you can check the type of event.

 

You can watch this video for more understanding.

Git - https://github.com/riteshmittal/aemscheduler-even-handling