AEMaaCS | Replication Push Notification | Community
Skip to main content
February 7, 2025
Solved

AEMaaCS | Replication Push Notification

  • February 7, 2025
  • 5 replies
  • 735 views

We are looking for guidance on the best approach of a replication push notification. What does AEM have to offer in regards to trigger push notification on all replication events (new,modified,delete,etc...).

We require a mechanism, where a replication event (also for multiple pages at the same time or tree activation) provides all necessary information on a resource that is being replicated. This must at leas include it's path and the type of the event.

Thank you for any advice in advance.

Best answer by Michael_Heil

Thank you all for the rapid responses. What i was really looking for was an OOTB approach to the topic. Especially the part of child page deletion or mass publication where the OSGI events fall short on the information of all the affected resources.

I found was i was looking for in the new AEM EVENTs for AEM sites and assets.

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/aem-eventing/examples/webhook

https://developer.adobe.com/experience-cloud/experience-manager-apis/guides/events/#enable-aem-events-on-your-aem-cloud-service-environment

Which came with the release:

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/release-notes/release-notes/2024/release-notes-2024-10-0#sites

 

5 replies

joerghoh
Adobe Employee
Adobe Employee
February 7, 2025

AEM sends by default OSGI events which include that information (you can check that in the webconsole: OSGI -> Events); do these events contain enough information?

ManviSharma
Adobe Employee
Adobe Employee
February 9, 2025

Hi,

To trigger push notifications on all replication events (such as new, modified, deleted content) in AEM , you can leverage several mechanisms and best practices:

I) AEM employs Sling Eventing, which can be used to handle replication events. Events like rep_activate, rep_deactivate, or rep_delete are fired when replication actions are completed. These events can be intercepted using an event handler.

II) You can create a custom replication listener that hooks into AEM’s replication agents to capture details of the replicated resources (e.g., path, type of event) and trigger notifications.

Regards,
Manvi Sharma




Uppari_Ramesh
February 10, 2025

@michael_heil ,

 

You can create EventHandler with topic as replication activation/deactivation. Once the replication triggers on a path then then this handler will invoke and here you get the path of the event and and also event action. Here you write code to programmatically creating the notifications.

 

Prosorg.osgi.service.event.EventHandler

1. Gives you event type and path of the event.

2. You can only enable this to some paths and if you want to ignore some other paths you can ignore here.

3. Once the replication is triggered then only this handler will trigger.

4. AEM itself offers post event handlers to do something post some activity and similarly you can have your own handler. This should be the best suitable for capturing replication events.

 

There are other ways as well like using event listener for cq:ReplicationAction property or for the paths /var/eventing/jobs/***/replication but that is costly approach.

 

Thanks,

Ramesh.

Michael_HeilAuthorAccepted solution
February 10, 2025

Thank you all for the rapid responses. What i was really looking for was an OOTB approach to the topic. Especially the part of child page deletion or mass publication where the OSGI events fall short on the information of all the affected resources.

I found was i was looking for in the new AEM EVENTs for AEM sites and assets.

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/aem-eventing/examples/webhook

https://developer.adobe.com/experience-cloud/experience-manager-apis/guides/events/#enable-aem-events-on-your-aem-cloud-service-environment

Which came with the release:

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/release-notes/release-notes/2024/release-notes-2024-10-0#sites

 

kautuk_sahni
Community Manager
Community Manager
February 10, 2025

@michael_heil Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
February 10, 2025

Hello @kautuk_sahni ,

As stated, the solution to my problem is within my own response from above, which i myself can not mark as the correct answer.

regards,
Michael