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
Best practices, limitations, and operational guidelines for replication in AEM 6.5 LTS.
Prohibited:
// NEVER DO THIS
authInfo.put(ResourceResolverFactory.USER, "admin");
authInfo.put(ResourceResolverFactory.PASSWORD, "admin");Required:
// Use service user
authInfo.put(ResourceResolverFactory.SUBSERVICE, "replication-service");
resolver = resolverFactory.getServiceResourceResolver(authInfo);OSGi Config: org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-replication.cfg.json
{
"user.mapping": [
"com.mycompany.aem.core:replication-service=replication-service"
]
}Required JCR Permissions:
Service user replication-service needs:
/content, /conf/var/replication/outbox (reverse replication)jcr:all on replicated pathsAuthor to Publish:
http://publish-host:4503/bin/receive?sling:authRequestLogin=1
https://publish-host:4503/bin/receive?sling:authRequestLogin=1Dispatcher Flush:
http://dispatcher-host:80/dispatcher/invalidate.cacheReverse Replication:
http://author-host:4502/bin/receive?sling:authRequestLogin=1Avoid these common mistakes:
/bin/receive pathsling:authRequestLogin=1 query parameterlocalhost instead of actual hostname<aem-install>/crx-quickstart/logs/error.log<aem-install>/crx-quickstart/logs/replication.log<aem-install>/crx-quickstart/logs/request.logNavigate to: /system/console/slinglog
Add logger for:
com.day.cq.replicationlogs/replication.logLarge DAM Assets:
Slow Networks (WAN):
Do Not Exceed:
replicator.replicate(session, type, paths[], opts);Recommended Batch Sizes:
Performance Impact:
ReplicationOptions opts = new ReplicationOptions();
opts.setSynchronous(false); // Non-blockingUse asynchronous for:
Caller Responsibility:
public void activatePage(ResourceResolver resolver, String path) {
// Caller must close resolver
// Do NOT close inside this method
}Try-with-Resources Pattern:
try (ResourceResolver resolver = resolverFactory.getServiceResourceResolver(authInfo)) {
replicator.replicate(session, type, path);
} // Auto-closedManual Close:
ResourceResolver resolver = null;
try {
resolver = resolverFactory.getServiceResourceResolver(authInfo);
replicator.replicate(session, type, path);
} finally {
if (resolver != null && resolver.isLive()) {
resolver.close();
}
}System Paths:
/apps - Application code (deploy via package manager)/libs - AEM system libraries/etc/designs - Design configurations (deploy via package)/var/audit - Audit logs/etc/replication - Replication agent configsConsequences:
Content Paths:
/content - Site content/content/dam - Digital assets/content/experience-fragments - Experience fragments/content/forms - Forms dataAlerting Thresholds:
JMX Monitoring:
com.day.cq.replication:type=Agent,id=<agent-name>
└─ QueueNumEntries (gauge)
└─ QueueBlocked (boolean)Expected Rates:
Degradation Indicators:
Excessive replication creates version history growth:
/var/versionsSuppress Versions:
ReplicationOptions opts = new ReplicationOptions();
opts.setSuppressVersions(true); // No version createdUse For:
Avoid For:
Use HTTPS For:
Configuration:
https://publish-host:8443/bin/receive?sling:authRequestLogin=1Certificate Validation:
Service User: Preferred method Basic Auth: Acceptable for internal networks Token-Based: Not supported in 6.5 LTS replication
Always Validate:
/content/cq:Page, dam:Asset)While AEM 6.5 LTS maintains API compatibility throughout the 6.5.x release line, individual point releases may deprecate specific methods or introduce warnings:
Check Release Notes for Each 6.5.x Version:
@Deprecated annotations for alternative methodsRecommended Practice:
@Deprecated usage after upgradeKnown Stable APIs (6.5.0 - 6.5.21+):
Replicator interface - Core methods stable across all 6.5.x versionsReplicationOptions - Configuration class stableReplicationStatus - Status interface stableAgentManager - Agent management stableIf your code uses only these documented public APIs from the com.day.cq.replication package, it should remain compatible across all AEM 6.5 LTS service packs.
Avoid:
Prefer:
This reduces migration effort when moving to Cloud Service.
.tessl-plugin
skills
aem-replication
aem-workflow
dispatcher
ensure-agents-md
references
tuning-oak-query-indexes