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.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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.
Which came with the release:
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?
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
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.
Pros: org.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.
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.
Which came with the release:
@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!
Views
Replies
Total Likes
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
Views
Replies
Total Likes