In my project I have to publish large amount of assets. So I enabled Batch Publishing option for my replication Agent so that it will create batch of request instead of replicating assets individually.
But the problem is when I replicate asset by calling replicator API from my servlet and provide it list of path. It is creating the batch request for each path I have passed to it Instead of clubbing all paths in one request as you can see it
I want to know whether it is expected behaviour or am I miss understood something . I have tried to pass 1100 paths to test this functionality and it is taking longer time to complete
Solved! Go to Solution.
Views
Replies
Total Likes
if your code is calling the replication API anway directly: There is replicator.replicate() method which takes an array of pathes to replicate. IIRC even in AEM 6.x this packaged these paths up in a single call (in AEM CS it definitely does that).
Unfortunately, Replicator API does not have direct control over batch replication settings. It treats each replication request as a separate entity, even when batch replication is enabled.
So, when you are using a servlet to programmatically send replication requests, the batch settings is taking each request a new batch request instead of packaging them as a single request.
Alternatively, there is older question community to handle high volume of activations. The second option suggested by @
Hi @shivamra ,
The behavior you are experiencing might be due to the way the replication API processes the list of paths you provide. To better understand and potentially resolve this issue, let's go through a few key points and potential solutions.
Batch replication is intended to group multiple replication requests into a single batch to optimize performance, especially when dealing with a large number of assets. This should theoretically reduce the number of individual requests and improve overall throughput.
API Call Implementation:
Replication Agent Configuration:
Code Implementation:
Review Replicator API Documentation:
Check Replication Agent Settings:
Example Code for Batch Replication:
Logging and Debugging:
Consult Support or Community:
Batch replication should indeed club multiple paths into a single request, but if this is not happening, it might be due to misconfiguration or incorrect API usage. By reviewing the configuration, ensuring proper API usage, and debugging the code, you should be able to identify and resolve the issue. If all else fails, consulting official support or community forums can provide additional insights and solutions.
Hi @HrishikeshKa Can you please provide any reference or article for programmatically send paths (using replicator API) for Batch replication. Since I have seen Adobe documentation related to it and it didnt provide much info on how to perform batch replication programmtically
if your code is calling the replication API anway directly: There is replicator.replicate() method which takes an array of pathes to replicate. IIRC even in AEM 6.x this packaged these paths up in a single call (in AEM CS it definitely does that).
Views
Likes
Replies