CQ Reverse Replication

CQ Replication

Reverse Replication

Overview:

Reverse Replication is process of replicating user data back to author instance from publish instance. This may include any user related data, comments, form data etc.

Architecture:

In reverse replication, Publish instance reverse replication agent puts user data in "outbox" (An repository location where data is temporarily hold). Author instance have another agent matching agent which polls data from publish at regular interval. If data is found in outbox of publish instance, it is sync in author instance. This way synchronisation of data between publish to author is controlled.

Configure Reverse Replication:

  • From site admin click on Tools
  • Click on Replication -> Agents on Author
  • Click on new page -> select type as reverse replication (You can also copy and paste OOTB reverse replication agent to create new one)
  • Provide information in settings tab. Make sure that enabled is checked. Retry delay is delay between two request to outbox of publish instance.
  • Provide information in transport tab. Transport URI is replication URL of publish instance. Also "admin" uid and pwd of publish instance.
  • Once reverse replication agent is set go to agent page and then click on Test Connection.
  • All publish instance comes with Outbox enabled, If there is any issue with Outbox you can activate publish outbox from author to publish.
  • Once reverse replication is set up properly. You will see following message in your error.log

Reverse Replication Error Log Message

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse Sending message to localhost:4503

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse >> GET /bin/receive?sling:authRequestLogin=1 HTTP/1.0

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse >> Action: Internal Poll

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse >> Path:

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse >> Handle:

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse --

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse << HTTP/1.1 200 OK

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse << Connection: Keep-Alive

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse << Server: Day-Servlet-Engine/4.1.24

03.06.2013 15:51:37.635 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse << Content-Type: application/octet-stream

03.06.2013 15:51:37.636 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse << Content-Length: 32

03.06.2013 15:51:37.636 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse << Date: Mon, 03 Jun 2013 22:51:37 GMT

03.06.2013 15:51:37.636 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse Message sent.

03.06.2013 15:51:37.636 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse ------------------------------------------------

03.06.2013 15:51:37.636 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse Reverse replication successful.

03.06.2013 15:51:37.636 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse Fetched 0 pages from http://localhost:4503/bin/receive?sling:authRequestLogin=1

Note that not all node type / Events is subjected reverse replication. You might have to do some custom setting to get your custom data reverse replicated (That is not in scope of this tutorial). More information about reverse replication can be obtained from here