AEM as a Cloud Service: Behavior of Replication API setSynchronous(true) flag
✨ This content is AI generated and could be inaccurate. Generative AI Terms
This article explains how the setSynchronous(true) flag in the Replication API functions in Adobe Experience Manager as a Cloud Service, including what is and is not guaranteed when using this option.
Description description
Environment
- Adobe Experience Manager as a Cloud Service (all versions)
Symptoms
When using the Replication API with the setSynchronous(true) flag, there is uncertainty about what is guaranteed:
- Whether content has only been pushed to the replication queue
- Whether content is already present on publish instances
- How Sling Content Distribution (SCD) in AEM as a Cloud Service affects the process
No specific error messages are observed. The question concerns the expected behavior and guarantees of the synchronous flag in the cloud environment.
Cause
AEM as a Cloud Service uses Sling Content Distribution and a cloud-based pipeline for replication, which introduces eventual consistency for publish and cache updates after author-side processing is complete.
Resolution resolution
Follow the steps below to understand the behavior of setSynchronous(true):
- When the Replication API is called with setSynchronous(true), the API call waits until the author instance has completed its replication work for the request.
- This includes building the replication package and handing it off to the publish pipeline (Sling Content Distribution in AEM as a Cloud Service).
- Once the method returns successfully, the content is no longer just queued on the author; author-side processing is complete.
- The change has been committed into the publish pipeline and will be rolled out to publish instances and caches.
- The rollout to all publish nodes and CDN/Dispatcher is eventual and may not be complete at the exact moment the method returns.
To verify, confirm that the Replication API call with setSynchronous(true) returns successfully, indicating author-side processing is complete.