How check the number of Queue in ReplicationQueue in AEM6.5 Hi All,I need to check the number of Queues in replicationQueue before proceeding the activate or deactivate in a workflow if the number of queue in replication will be greater than 50 then it shoud not allow to trigger the workflow , how can I approach this? @Override
public void execute (WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowException {
String payload = workItem.getWorkflowData().getPayload().toString();
if (rootPage != null && replicationQueueChechk()) {
if (StringUtils.equalsIgnoreCase(comments, MOVE_TO_DEV_UNPUBLISH)) {
replicationOptions.setFilter(agent -> agent.getId().matches(".*(?<!agent)$"));
}
if (StringUtils.equalsIgnoreCase(comments, MOVE_TO_QA_UNPUBLISH)) {
replicationOptions.setFilter(agent -> agent.getId().endsWith("agent"));
}
try {