Expand my Community achievements bar.

SOLVED

Global sync listener for scd?

Avatar

Level 9

Watching the great gems session [1] couple of times. It was mentioned scd can be used to sync any folder in AEM.  I have set up the scd correctly and able to sync /home correctly.  But anything outside /home does not sync.  However making explicit curl command [2] sync correctly any thing outside /home.  That means listener is missing to call distribution api of scd outside the /home directory.   Please let me know

  • Is there any explicit package needs to be installed Or if i missed any configuration to update?   (Note:- Allowed roots configuration in Queue distribution setting does not help)
  • If needs to develop own listener what are the guidelines ?
  • Any plans in product roadmap to have this feature to sync any folder using scd.

[1]  Troubleshooting Sling Content Distribution

[2]  curl -u admin:admin http://localhost:8081/libs/sling/distribution/services/agents/reverse-pubsync -d 'action=ADD' -d 'path=/content/sample1'

1 Accepted Solution

Avatar

Correct answer by
Level 1

You setup is probably missing a service that detects changes in the repository and triggers distribution requests (similar the example you shared [2]) upon changes.

You would need to develop a service that issues distribution requests via the APIs at

https://github.com/apache/sling/tree/trunk/contrib/extensions/distribution/api/src/main/java/org/apa...

In particular, see the Distributor API

https://github.com/apache/sling/blob/trunk/contrib/extensions/distribution/api/src/main/java/org/apa...

Syncing content is highly dependent on the content structure related to a specific use case, thus making a generic implementation is tricky.

To my knowledge, there is no plan to have generic sync feature implemented. You could implement sync for your own use case.

View solution in original post

6 Replies

Avatar

Level 10

We have asked the team that presented this to look at this question.

Avatar

Correct answer by
Level 1

You setup is probably missing a service that detects changes in the repository and triggers distribution requests (similar the example you shared [2]) upon changes.

You would need to develop a service that issues distribution requests via the APIs at

https://github.com/apache/sling/tree/trunk/contrib/extensions/distribution/api/src/main/java/org/apa...

In particular, see the Distributor API

https://github.com/apache/sling/blob/trunk/contrib/extensions/distribution/api/src/main/java/org/apa...

Syncing content is highly dependent on the content structure related to a specific use case, thus making a generic implementation is tricky.

To my knowledge, there is no plan to have generic sync feature implemented. You could implement sync for your own use case.

Avatar

Level 9

thanks smacdonald2008 & @tmaret​.   We developed own & having another issue which i will post another thread ccing you. Please help.

Still I believe can be made genric. I have filled for enhancement request at acs commons  at  Content Sync Listener to trigger distribution workflow · Issue #1130 · Adobe-Consulting-Services/acs... .If profession service feel importance will contribute the code there.

Avatar

Former Community Member

Hi MC Stuff,

could you please guide me what all I will have to write custom ?

I have user working fine in my system.

I want my /content/dam/xyz folder to be in sync.

I understand I need to write a listener, and how do I use distribution API in it ?

Regards,

Akash B.