Introduction

I am doing some research on how replication works on CQ. Will include my findings here in detail.

Replication as word says is a mechanism to Replicate content from author instance to publish instance and vice versa.

There are Four types of OOTB replication agents supported by CQ. (You can create your own replication agent types, One known replication agent is FAST connector replication agent)

1) Publish Replication Agent (Default Agent)
2) Reverse replication Agent
3) Dispatcher Flush Agent
4) Static Agent

We will cover all of them in details in next pages.

You can configure replication agents by going to "tools" from CQ welcome screen or from CRX.

Basic Information about replication agents can be found here

Please click here to see replication package Hierarchy

Please note that all the replication Agents uses same template, So UI for all replication agents will remain same. There are certain settings which makes them different from one another. So make sure that while setting up replication agents you keep this in mind.

Global Configuration Description



Name

A unique name for the replication agent.

Description

A description of the purpose this replication agent will serve.

Enabled

Indicates whether the replication agent is currently enabled.

When the agent is enabled the queue will be shown as:

  • Active when items are being processed.
  • Idle when the queue is empty.
  • Blocked when items are in the queue, but cannot be processed; for example, when the receiving queue is disabled.
Serialization Type

The type of serialization:

  • Default: Set if the agent is to be automatically selected.
  • Dispatcher Flush: Select this if the agent is to be used for flushing the dispatcher cache.
Retry Delay

The delay (waiting time in milliseconds) between two retries, should a problem be encountered.

Default: 60000

Agent User Id

The agent will use this user account to collect and package the content from the author environment.

Leave this field empty to use the system user account (the account defined in sling as the administrator user; by default this is admin).

CAUTION

This account must have read access to all paths that you want to have replicated.

NOTE

This can be used as a mechanism for selecting specific content for replication.

Log Level

Specifies the level of detail to be used for log messages.

  • Error: only errors will be logged
  • Info: errors, warnings and other informational messages will be logged
  • Debug: a high level of detail will be used in the messages, primarily for debug purposes

Default: Info

Use for reverse replication

Indicates whether this agent will be used for reverse replication; returns user input from the publish to author environment.







URI

This specifies the receiving servlet at the target location. In particular, you can specify the hostname (or alias) and context path to the target instance here.

For example:

  • A Default Agent may replicate to http://localhost:4503/bin/receive
  • A Dispatcher Flush agent may replicate to http://localhost:8000/dispatcher/invalidate.cache

The protocol specified here (HTTP or HTTPS) will determine the transport method.

User

User name of the account to be used for accessing the target.

Password

Password for the account to be used for accessing the target.

NTLM Domain

Domain for NTML authentication.

NTLM Host

Host for NTML authentication.

Enable relaxed SSL

Enable if you want self-certified SSL certificates to be accepted.

Allow expired certs

Enable if you want expired SSL certificates to be accepted.



Proxy Host

Hostname of the proxy used for transport.

Proxy Port

Port of the proxy.

Proxy User

User name of the account to be used.

Proxy Password

Password of the account to be used.

Proxy NTLM Domain

The proxy NTLM domain.

Proxy NTLM Host

The proxy NTLM domain.




Interface

Here you can define the socket interface to bind to.

This sets the local address to be used when creating connections. If this is not set, the default address will be used. This is useful for specifying the interface to use on multi-homed or clustered systems.

HTTP Method

The HTTP method to be used.

For a Dispatcher Flush agent this is nearly always GET and should not be changed (POST would be another possible value).

HTTP Headers

These are used for Dispatcher Flush agents and specify elements that must be flushed.

For a Dispatcher Flush agent the three standard entries should not need changing:

  • CQ-Action:{action}
  • CQ-Handle:{path}
  • CQ-Path:{path}

These are used, as appropriate, to indicate the action to be used when flushing the handle or path. The sub-parameters are dynamic:

  • {action} indicates a replication action
  • {path} indicates a path

They are substituted by the path/action relevant to the request and therefore do not need to be "hardcoded":

NOTE

If you have installed CQ in a context other than the recommended default context, then you will need to register the context in the HTTP Headers. For example:
    CQ-Handle:/<yourContext>{path}

Connect Timeout

Timeout (in milliseconds) to be applied when trying to establish a connection.

Socket Timeout

Timeout (in milliseconds) to be applied when waiting for traffic after a connection has been established.

Protocol Version

Version of the protocol; for example 1.0 for HTTP/1.0.



Ignore default

If checked, the agent is excluded from default replication; this means it will not be used if a content author issues a replication action. Please note that a agent can be enabled and ignored at same time. Use case would be if you are creating a Agent that extends default agent (Of type replication Agent) and you don't want to trigger this agent on replication event (That is when user click on activate or deactivate button)

On Modification

Here a replication by this agent will be automatically triggered when a page is modified. This is mainly used for Dispatcher Flush agents, but also for reverse replication.

CAUTION

Be very careful by setting this option for reverse replication, as it may cause infinite loop. In conjunction with replication it may trigger reverse replication from publish side. 


On Distribute

If checked, the agent will automatically replicate any content that is marked for distribution when it is modified. This is used when cq:distribute property is set on the node. So essentially when you create a node with cq:distribute property set and this check box checked, Corresponding node with get replicated. This could be used for reverse replication.

On-/Offtime reached

This will trigger automatic replication (to activate or deactivate a page as appropriate) when the ontimes or offtimes defined for a page occur. This is primarily used for Dispatcher Flush agents and Default agent if you want to enable schedule activation/deactivation.

No Status Update

When checked the agent will not force a replication status update.

No Versioning

When checked the agent will not force versioning of activated pages.









Disclaimer: Content in this site should only be used for testing purpose. Please use information on this site on your own risk. I would for no reason held responsible for damage caused in your system after using this information.



Comments