Expand my Community achievements bar.

SOLVED

Sling content distribution not working

Avatar

Level 2

I am using  sling distribution agent package distributed but its not working for me.
This is what I have.

@Component(immediate = true, service = EventHandler.class, property = { "event.topics=org/apache/sling/distribution/agent/package/distributed",
"event.filter=(|(distribution.type=ADD)(distribution.type=DELETE))" })
public class CDEventHandler implements EventHandler {

 

@Override
public void handleEvent(Event event) {

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @baw_gov ,

 

Please check if your component is active by going to http://<host>:<port>/system/console/components and search for "CDEventHandler".

 

Also, if you are not doing any custom logic implementation inside your handler and just want content distribution then we have another way as well. you can refer below video for that-

 

https://www.youtube.com/watch?v=z6nf2QSUM8k

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @baw_gov ,

 

Please check if your component is active by going to http://<host>:<port>/system/console/components and search for "CDEventHandler".

 

Also, if you are not doing any custom logic implementation inside your handler and just want content distribution then we have another way as well. you can refer below video for that-

 

https://www.youtube.com/watch?v=z6nf2QSUM8k

Avatar

Employee Advisor

@baw_gov 

you can try using a different event topic i.e.org/apache/sling/distribution/agent/package/created

BTW which version of AEM you're using?