ReplicationEvent not triggering on the event in AEMaaCS | Community
Skip to main content
Level 4
May 27, 2024

ReplicationEvent not triggering on the event in AEMaaCS

  • May 27, 2024
  • 4 replies
  • 2173 views

i'm trying to trigger this listener on the event of replication but its not triggering.

 

i have a scenario where i need delete zip extraction content in publish environment  on event of unpublish/delete zipfile from author environment.

 

same solution its working fine in on-prem but in AEMaaCS is not working. 

 

@8220494(service = EventHandler.class, immediate = true, 
property = {
 AppConstants.SERVICE_DESCRIPTION + "=Replication Listener on publish",
 EventConstants.EVENT_TOPIC + "=" + "com/adobe/granite/replication"
 })
public class ReplicationListener implements EventHandler {
    private static final Logger LOG = LoggerFactory.getLogger(ReplicationListener.class);
    @3214626
    private JobManager jobManager;
 
    @9944223
    public void handleEvent(final Event event) {
 
            final String METHOD_NAME = "handleEvent";
            final ReplicationAction replicationAction = ReplicationEvent.fromEvent(event).getReplicationAction();
            final ReplicationActionType actionType = replicationAction.getType();
            final String filePath = replicationAction.getPath().
 
}
}
 
is there anything i need modify for AEMaaCS??
 
can anyone guide on this??
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

aanchal-sikka
Community Advisor
Community Advisor
May 27, 2024

@karthickve 

 

Deactivation should automatically trigger delete on publish. This is OOTB behaviour. Are you observing some discrepancy?

Aanchal Sikka
Level 4
May 27, 2024

@aanchal-sikka , This  EventConstants.EVENT_TOPIC + "=" + "com/adobe/granite/replication" event is not trigger in AEMaaCS and not sure why.

 

same its working fine in on-prem. i'm just trying to migrate to AEMaaCS but its not working.

aanchal-sikka
Community Advisor
Community Advisor
May 28, 2024

@karthickve 

 

I guess that's because Cloud emits following event

Cloud uses SCD, thus the events might also be different.

 

But, as I mentioned earlier, please cross-check, deactivation from author should automatically delete files in publish OOTB.

Aanchal Sikka
kautuk_sahni
Community Manager
Community Manager
June 4, 2024

@aanchal-sikka Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
h_kataria
Community Advisor
Community Advisor
June 18, 2024