Sling content distribution not working

Avatar

Avatar
Ignite 1
Level 1
baw_gov
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile

Avatar
Ignite 1
Level 1
baw_gov
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile
baw_gov
Level 1

16-06-2021

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) {

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Level 7
Ritesh_M
Level 7

Likes

179 likes

Total Posts

142 posts

Correct reply

44 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Boost 5
Level 7
Ritesh_M
Level 7

Likes

179 likes

Total Posts

142 posts

Correct reply

44 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
Ritesh_M
Level 7

17-06-2021

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

Answers (1)

Answers (1)

Avatar

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

249 likes

Total Posts

410 posts

Correct reply

107 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

249 likes

Total Posts

410 posts

Correct reply

107 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile
shelly-goel
MVP

20-06-2021

@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?