All AEM 6.5 LTS skills: Workflow model design, development, triggering, launchers, debugging, and triaging; Dispatcher config authoring, advisory, incident response, performance tuning, and security hardening; Replication agent configuration, content activation, API usage, and troubleshooting for AEM 6.5 LTS and AMS environments; Jackrabbit Oak query/index tuning (property, Lucene index definitions); and extracting/inventorying JCR queries (XPath, SQL2, QueryBuilder) across a codebase.
79%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Reference guide for AEM 6.5 LTS replication queue behavior and management.
Replication queues use First-In-First-Out (FIFO) ordering:
Active Queue:
/etc/replication/agents.author/<agent-name>.htmlcom.day.cq.replication:type=Agent,id=<agent-name>Blocked Queue:
Submit → Queue → Serialize → Transport → Acknowledge → Remove
↓ ↓
(pending) (blocked?)
↓
Retry LogicReplication retries on:
Does NOT retry on:
Navigate to: /etc/replication/agents.author/<agent-name>.html
Actions:
Navigate to: http://localhost:4502/system/console/jmx
MBean: com.day.cq.replication:type=Agent,id=<agent-name>
Metrics:
QueueNumEntries - Current queue depthQueueBlocked - Boolean blocked statusQueueProcessingSince - Timestamp of current itemOperations:
retryFirst() - Retry first blocked itemclear() - Empty queue (destructive)JMX Security Considerations:
Access to JMX operations requires appropriate permissions:
http://localhost:4502/system/console/jmx)administrators group can invoke JMX operations by defaultreplication.log - enable JMX audit logging for compliance environmentsclear() permanently removes queued replication items - use with caution and only after verifying queue stateRecommended Production Setup:
High queue depth causes:
Mitigation:
If item N blocks:
Resolution:
Symptom: Queue depth stays constant or grows
Causes:
Diagnosis:
Symptom: Queue depth gradually increases
Causes:
Diagnosis:
For event-driven queue monitoring, implement a custom ReplicationListener to react to queue state changes:
import com.day.cq.replication.Agent;
import com.day.cq.replication.ReplicationAction;
import com.day.cq.replication.ReplicationListener;
import com.day.cq.replication.ReplicationResult;
import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Component(
service = ReplicationListener.class,
immediate = true
)
public class QueueMonitorListener implements ReplicationListener {
private static final Logger LOG = LoggerFactory.getLogger(QueueMonitorListener.class);
private static final int ALERT_THRESHOLD = 20;
@Override
public void onStart(Agent agent, ReplicationAction action) {
// Check queue depth at replication start
int queueSize = agent.getQueue().getEntries().size();
if (queueSize > ALERT_THRESHOLD) {
LOG.warn("Queue depth elevated for agent {}: {} items",
agent.getId(), queueSize);
// Send alert to monitoring system
alertHighQueueDepth(agent.getId(), queueSize);
}
}
@Override
public void onEnd(Agent agent, ReplicationAction action, ReplicationResult result) {
if (result.isSuccess()) {
LOG.debug("Replication completed for path: {}", action.getPath());
} else {
LOG.error("Replication failed for path: {}, Queue may be blocked",
action.getPath());
checkQueueBlocked(agent);
}
}
@Override
public void onError(Agent agent, ReplicationAction action, Exception exception) {
LOG.error("Replication error for path: {}", action.getPath(), exception);
// Check if queue is blocked
if (agent.getQueue().getState() == ReplicationQueue.State.BLOCKED) {
LOG.error("Queue BLOCKED for agent: {}", agent.getId());
alertQueueBlocked(agent.getId());
}
}
private void checkQueueBlocked(Agent agent) {
if (agent.getQueue().getState() == ReplicationQueue.State.BLOCKED) {
alertQueueBlocked(agent.getId());
}
}
private void alertHighQueueDepth(String agentId, int queueSize) {
// Integration with monitoring system (e.g., Datadog, New Relic, PagerDuty)
}
private void alertQueueBlocked(String agentId) {
// Send critical alert - queue is blocked and requires intervention
}
}Event-Driven Monitoring Use Cases:
Listener Registration: Listeners registered as OSGi services are automatically invoked by the replication framework for all replication events across all agents.
.tessl-plugin
skills
aem-replication
aem-workflow
dispatcher
ensure-agents-md
references
tuning-oak-query-indexes