What's the best way to have custom dispatcher replication and flush



I am working on a requirement that absolutely need custom dispatcher replication and flush. Below are my requirements:

  • I have 1 publisher that serves content to 10 dispatchers.
  • Each dispatcher reside on premise that has internet connectivity constraint (via satellite), which they are periodically disconnected from the internet.

I have a logic (java code) to handle content replication and cache flush from dispatcher based on the availability of the dispatcher.

What I don't know how to do is to:

  • Completely disable out-of-the-box feature that replicates content from publisher to dispatcher when content author publish/activate content on author instance.
  • Completely remove dispatcher flush agent on publisher (this, I believe I know how, but I still want to ask and see if the recommendation is inline with my idea)

P.S. the AEM environment is AEM 6.3.

Any recommendation/help will be greatly appreciated.








Dear Sothea,

It looks like you solved the hardest part, the remained is to simply disable replication agent via it's settings. When it's disabled then replication does not happen. See this on further info [0]

[0] Replication






Thanks. Just clarify. I would like to disable AEM PUBLISHER from sending these requests:


com.day.cq.replication.Agent.dispatcher1OAAgent sent. Response: 200 OK

com.day.cq.replication.Agent.dispatcher1OAAgent ------------------------------------------------

com.day.cq.replication.Agent.dispatcher1OAAgent Sending message to

com.day.cq.replication.Agent.dispatcher1OAAgent >> POST /dispatcher/invalidate.cache HTTP/1.0

com.day.cq.replication.Agent.dispatcher1OAAgent >> CQ-Action: Activate

com.day.cq.replication.Agent.dispatcher1OAAgent >> CQ-Handle: /path/to/my/content

com.day.cq.replication.Agent.dispatcher1OAAgent >> CQ-Path: /path/to/my/content

com.day.cq.replication.Agent.dispatcher1OAAgent >> Referer: about:blank

com.day.cq.replication.Agent.dispatcher1OAAgent >> Connection: close

com.day.cq.replication.Agent.dispatcher1OAAgent >> Content-Length: 0

com.day.cq.replication.Agent.dispatcher1OAAgent >> Content-Type: application/octet-stream

com.day.cq.replication.Agent.dispatcher1OAAgent --

com.day.cq.replication.Agent.dispatcher1OAAgent << HTTP/1.1 200 OK

com.day.cq.replication.Agent.dispatcher1OAAgent << Date: Wed, 19 Sep 2018 04:11:31 GMT

com.day.cq.replication.Agent.dispatcher1OAAgent << Server: Apache/2.4.29 (Unix) Communique/4.2.3

com.day.cq.replication.Agent.dispatcher1OAAgent << X-Frame-Options: SAMEORIGIN

com.day.cq.replication.Agent.dispatcher1OAAgent << Vary: User-Agent

com.day.cq.replication.Agent.dispatcher1OAAgent << Content-Length: 13

com.day.cq.replication.Agent.dispatcher1OAAgent << Connection: close

com.day.cq.replication.Agent.dispatcher1OAAgent << Content-Type: text/html; charset=UTF-8

com.day.cq.replication.Agent.dispatcher1OAAgent <<

com.day.cq.replication.Agent.dispatcher1OAAgent <<

com.day.cq.replication.Agent.dispatcher1OAAgent Message sent.

com.day.cq.replication.Agent.dispatcher1OAAgent ------------------------------------------------

com.day.cq.replication.Agent.dispatcher1OAAgent Replication (ACTIVATE) of /path/to/my/content successful.

com.day.cq.replication.Agent.dispatcher1OAAgent.queue Job for agent dispatcher1OAAgent processed in 253ms. Ok.

com.day.cq.replication.Agent.dispatcher1SRAgent sent. Response: 200 OK

com.day.cq.replication.Agent.dispatcher1SRAgent ------------------------------------------------


com.day.cq.replication.Agent.flush Sending GET request to {protocol}://{host:port}/dispatcher/invalidate.cache