Search code examples
workflowaem

How do I programmatically activate pages to only certain replication agents in AEM?


How do I programmatically activate pages to only certain replication agents in AEM using Replication API's


Solution

  • AEM provides ReplicationOptions API. This can help selecting the replication agent using public void setFilter(AgentFilter filter).

    Agent can be named as per requirement, the API can match exact Agent name in public void setFilter(AgentFilter filter) or regex can be used to match required agents.

    Also refer another answer on this