ACS commons dispatcher Flush rules not working in AEMaaCS | Community
Skip to main content
Level 2
September 13, 2024

ACS commons dispatcher Flush rules not working in AEMaaCS

  • September 13, 2024
  • 3 replies
  • 2213 views

Dear AEM Folks ,

We are currently facing one issue while configuring ACS commons dispatcher Flush rules in AEMaaCS .Our rule looks like below :

com.adobe.acs.commons.replication.dispatcher.impl.DispatcherFlushRulesImpl.cfg.json

{
  "prop.rules.resource-only":[
    "/content/dam/myproject/headless/mobile-app/message-1=/graphql/execute.json/global/testQuery",
    "/content/dam/myproject/headless/.*=/graphql/execute.json/global"
  ],
  "prop.replication-action-type":"DELETE"
}
Basically the above rule is used to flush the cache of persisted graphql query when particular Content Fragment is published.
The above configuration is placed in author server as mentioned in https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.html for AEMaaCS.
Now while publishing the CF , I can see in AEM author error logs as below and nothing is flushed.

ERROR :

13.09.2024 01:45:41.855 [cm-pXX8765-eXX786-aem-author-79XXX8d6f-9gqvx] *ERROR* [165.225.232.99 [1726191941847] POST /bin/replicate.json HTTP/1.1] com.adobe.acs.commons.replication.dispatcher.impl.DispatcherFlushRulesImpl Error issuing dispatcher flush rules, some downstream replication exception occurred: Replication triggered, but no agent found!
com.day.cq.replication.AgentNotFoundException: Replication triggered, but no agent found!
at com.day.cq.replication.impl.ReplicatorImpl.determineAgentsAndOptions(ReplicatorImpl.java:732) [com.day.cq.cq-replication:6.6.6]
at com.day.cq.replication.impl.ReplicatorImpl.replicateInternal(ReplicatorImpl.java:487) [com.day.cq.cq-replication:6.6.6]
at com.day.cq.replication.impl.ReplicatorImpl.replicate(ReplicatorImpl.java:434) [com.day.cq.cq-replication:6.6.6]
at com.day.cq.replication.impl.ReplicatorImpl.replicate(ReplicatorImpl.java:410) [com.day.cq.cq-replication:6.6.6]
at com.day.cq.replication.impl.ReplicatorImpl.replicate(ReplicatorImpl.java:392) [com.day.cq.cq-replication:6.6.6]
at com.adobe.acs.commons.replication.dispatcher.impl.DispatcherFlusherImpl.flush(DispatcherFlusherImpl.java:106) [com.adobe.acs.acs-aem-commons-bundle:5.7.0]
at com.adobe.acs.commons.replication.dispatcher.impl.DispatcherFlushRulesImpl.preprocess(DispatcherFlushRulesImpl.java:193) [com.adobe.acs.acs-aem-commons-bundle:5.7.0]


Kindly let me know what is going wrong over here as we don't have any control over replication agents in AEMaaCS.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

MukeshYadav_
Community Advisor
Community Advisor
September 13, 2024
Level 2
September 13, 2024

Hi @mukeshyadav_ ,

But flush replication agent in AEMaaCS is taken care by Adobe itself and we don't have any control as per Onpremise.

Thanks.

Level 2
September 16, 2024

Hi @kaushikda1 ,

Okay,

You may check this thread if helpful https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/flush-the-graphql-persisted-query-while-publishing-content/td-p/551615

prop.rules.resource-only is available for AEM 6.5 only https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.html

 

Thanks


The error remains same . Tried following below config.

{
  "prop.rules.hierarchical":[
    "/content/dam/myproject/headless/.*=/graphql/execute.json/global/*"
  ],
  "prop.replication-action-type":"INHERIT"
}
h_kataria
Community Advisor
Community Advisor
September 13, 2024

prop.rules.resource-only is only applicable for AEM6.5
For AEMaaCS you probably will have to change the rules and try using 

prop.rules.hierarchical


https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.html 

Level 2
September 16, 2024

Tried with 

prop.rules.hierarchical

but still the error remains same .
Config :

{
  "prop.rules.hierarchical":[
    "/content/dam/myproject/headless/.*=/graphql/execute.json/global/*"
  ],
  "prop.replication-action-type":"INHERIT"
}
h_kataria
Community Advisor
Community Advisor
September 17, 2024

Could you please tell me your ACS commons version which you are using ? Cloud dispatcher flush rules were introduces in ACS version 6.3, so you need to use that or some version released after that.
Also, you need to provide absolute path to flush as per documentation, you can use regexp groups though.
So, you will also possibly need to modify your rule to 

 

{ "prop.rules.hierarchical":[ "/content/dam/myproject/headless/.*=/graphql/execute.json/global" ], "prop.replication-action-type":"INHERIT" }

 

 But this will not be the cause for the error.
Other possible reason could be some issue with the code deployment itself. 
Please provide your config package via a private message to check further. 

kautuk_sahni
Community Manager
Community Manager
September 13, 2024

@kaushikda1 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
Level 2
September 16, 2024

@kautuk_sahni - not yet with the solution provided , hoping to get some more solutions from learned folks.

September 27, 2024

Hi @kaushikda1 

Can you confirm you are using cloud version of ACS commons? My guess is If you have installed non-cloud version of ACS commons, then the dispatcher flush is looking for replication agent.