Expand my Community achievements bar.

AEM Page Replication Event in Publisher

Avatar

Level 3

Hi Team,

 

When we are publishing a page, requirement is to capture Page Replication event in Publish Instance only and do some logic due to some business use case.

 

Below code works fine and capture Page replicate event in Author. but not in publish. 

Changed event.topics value as ReplicationEvent.EVENT_TOPIC as well. Still It does not work in Publisher.

 

@Component(
service = EventHandler.class,
immediate = true,
property = {
"event.topics=" + ReplicationAction.EVENT_TOPIC
}
)

 

Thanks in advance.

1 Reply

Avatar

Community Advisor

@arvindpandey are you using AEM on-prem or AMS or Cloud?

 

The event generated on the sending side (author) is under the topic com/day/cq/replication. The event generated on the receiving side (publish) is under the topic com/adobe/granite/replication. These are represented by the constants ReplicationAction.EVENT_TOPIC and ReplicationEvent.EVENT_TOPIC respectively.