I want to create an event listener on publish page event
Hi
I want to write an AEM bundle that listens to page publish events.
I got this boilerplate code from chat GPT but I'm not sure what should be the event topic
@8220494(immediate = true, service = EventHandler.class,
property = {
"event.topics=" + PageEvent.TOPIC,
"event.filter=(eventType=pagePublished)"
})
public class PagePublishEventListener implements EventHandler {
I tried various topics and couldn't get it working.
The only way I could get my listener to be invoked is by listening to all events
property = {
"event.topics=*"
})Which I don't want.
How can I listen only to page publish events?