We have a use case to catch the replication event of a resource in the authoring and perform some manipulation on it. We are leveraging org.osgi.service.event.EventHandler
to catch this event.
We have observed, occasionally this event is not getting caught.
We tried to troubleshoot the issue and found the cause of the issue to be the event getting blacklisted.
Updating the org.apache.felix.eventadmin.impl.EventAdmin
fixed our issue. But as per the below documentation. This OSGi configuration marked as deprecated.
We found a solution, to leverage Sling Jobs to process the already caught event. This is a perfectly apt approach.
Reference: https://www.linkedin.com/pulse/aem-how-write-sling-jobs-aem-veena-vikraman
FYI: We are on AEM 6.5