Friday, March 17, 2023

Adobe aem Replication Agent

Let you have made changes in the page of adobe aem which is the content management system, you have created a page in the AEM author instance, and you have two publisher instances running, now you have to publish the page on both of the instances separately.






Solution - Replication Agent

In adobe aem, the replication agent is responsible for replicating content between instances of adobe aem. Replication agents are used to transfer content, such as pages, assets, configurations, and workflows from one AEM instance to another.

The replication agent is a configurable component that runs on both the author and publisher instances of adobe aem. It is used to transfer content between these two instances in a secure and efficient manner.


How to Setup - Replication Agent on Author


  • Go to the AEM Tools, Deployment, Replication then Agents on Author 
  • Go to Default Agent (publish) then click on the Edit button

adobe aem content management

Settings Tab

  • To Activate the agent check the Enable 
  • In Serialization Type, if you are using this agent to flush the dispatcher cache then use Dispatcher Flush. otherwise, keep it as the default
  • Agent User ID if you are applying an agent on adobe aem author instance in this case this account must have read permission to all path.
  • Agent User ID if you are applying an agent on adobe aem publish instance in this case this account must have to create/write permission to all path.
adobe aem content management


Transport Tab

  • In URI you need to specify the instance  URL where you want to replicate the pages
adobe aem content management


Triggers Tab

  • In Triggers if you want to replicate your pages on every modification then check On Modification. (This is mainly used for Dispatcher Flush agents)
  • if you want to replicate pages on Every Publish then check the On-/OffTime reached. (This is primarily used for Dispatcher Flush agents)
adobe aem content management

So
  • Now you can check the Agent is activated now
  • To check your agent log, click on View log
  • To check the connection between this agent and your targeted instance where you want to replicate is successful or not click on Test Connection 
adobe aem content management

Testing 

Now for testing, I am going to make any change on any page on the author side and then will publish the page, due to agent changes will be replicate to my Publish instance. 


Changes on Author
adobe aem content management

After Publish the Page on Publish Side

adobe aem content management

Thanks

Agent For Dispatcher Flush Cache




Thursday, January 12, 2023

Dispatcher Flush Agents |  Clear AEM Dispatcher Cache










Problem


Let you have configured AEM dispatcher with server and its creating cache and working fine, suppose you make some changes in any page in aem-author side and you have moved that page to aem-publish side. someone is requesting this page so in that case dispatcher will redirect old page it will not redirect updated page because its have cache of old page.



Solution - Dispatcher Flush Agent:  

In that case we are going to setup dispatcher flush agent it will  check if any new or updated content is published in aem-publisher it will remove the old cache and  will redirect the new updated page to the user and will create the cache of updated page.


How to Setup Dispatcher Flush Agent

  • Goto->aem-author->tools->Deployment->Replication->Agents on publish
  • Click on Dispatcher Flush -> edit




  • In setting part check the enable


  • In Transport Part write your port and save


  • then goto "http://localhost:4502/miscadmin#/etc/replication/agents.publish" and mark the publishe and click activate




    Now if you will publish the updated page from aem-author side then the dispatcher flush agent will remove the cache of the old page automatically.

"Usually in live projects, we apply dispatcher flush agent on Publish Instance (agent on Publish)"
dispatcher flush agent will be triggered on every modification on Publisher


Errors:
  • if you got error "Peer not authenticated" (then select Relaxed in ssl )
  • if you get error "Forbidden" then go to dispatcher.any file under allowedClients add ip of your author.
Thanks