Expand my Community achievements bar.

AEMaaCS Replicator api golden publish issue

Avatar

Level 3

Hi 

 

We are using replicator api to clear dispatcher cache programmatically on AEM as a Cloud service,

Below are the lines used.

 

ReplicationOptions options = new ReplicationOptions();

options.setSynchronous(true);

options.setFilter(agent -> agent.getId().equals("flush"));

this.replicator.replicate(session, ReplicationActionType.DEACTIVATE, paths, options);

 

It is working as expected for publishers. But we are getting below exception for golden publishers.

 

Exception while clearing cache com.day.cq.replication.AgentNotFoundException: Replication triggered, but no agent found!

 

May i know how we can restrict the code to execute only for publishers not golden publishers.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Community Advisor

Hi @testtttt1 
What is golden publisher? Are you on AMS or AEMaaCS?

Please check replication agents on publisher where it is not working.



Arun Patidar

Avatar

Community Advisor

Hi,

The concept of a golden master was introduced for automating the life cycle of publish nodes. The golden master is specialized publish node never accessed by end-user, and from which all the nodes of the publish services are created. Maintenance operations such as compaction are performed on the content repository attached to golden master. 

Ref-https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/developing/basics/...

Thanks,