We have our AEM set-up with one author and multiple publish instance. We are working on Sling Content Distribution (SCD) to synch the changes on one publish instance to all other publish instance as well as on author. We are using the "sling-org-apache-sling-distribution-core" API for creating the distribution request. The required agent configuration has been done on author and publish instances.
We are having issue in calling the distribution request while trying to use Sling distribution API to sync assets, on other publishers and author if any change is made on one of the publishers. We are trying to import org.apache.sling.distribution.impl.DefaultDistributor and org.apache.sling.distribution.agent.spi.DistributionAgent from the "impl" and "agent" packages in distribution API but these packages and various other packages are not available and my import is not resolved.
I don't see the class SimpleDistributionResponse too. I just see a couple of classes like SimpleDistributionRequest, DistributionRequestType etc.
Please suggest, we intend to invoke distribute method from Distributor interface and it needs DistributionAgent. And without these packages being available in the API, we are not able to proceed.
Could you please advise if any anyone has implemented this distribution request using the sling distribution API package? Are we using correct API package? If not, please share the link/pointers to correct API with all the required packages.
Thank you in advance!
Are these answers useful? Help other community members by marking useful answers as accepted.
Have you explored possibility of using standard AEM OOTB replication system, with this system you could use normal AEM replication API. This API is 2 hierarchies's higher than Sling Distribution, it still relies on Sling distribution for part of it's functionality, while trying to hide all of the complexity, via the brilliant AEM Interface!
Furthermore, to distribute simple state data between all instances, Redis with persistence or other similar tools, might prove better choice. They can transfer only state you need, without going through reverse replication to journeys.
In terms of the package path's you are trying to resolve now, I'm afraid you won't be able to resolve .impl one, as it's not exported by the Distribution bundle. org.apache.sling.distribution.agent.spi, should resolve fine through.