We use AEM 6.2 and we have to implement two Replication Preprocessors (com.day.cq.replication.Preprocessor). When I include second preprocessor, the system is only executing the first one. When I delete the first one, second preprocessor executes properly.
I did not find enough documentation and samples on having more than one preprocessor implementation.
Could someone advise whether it is needed to configure some additional properties in order for all preprocessors to be launched?
Thank you.
Examples:
@Component(immediate = true, label = "Preprocessor 1")
@Service
public class ReplicationPreprocessor1 implements Preprocessor {
@Override
public void preprocess(final ReplicationAction replicationAction, final ReplicationOptions replicationOptions)
throws ReplicationException {
// Do something
}
}
@Component(immediate = true, label = "Preprocessor 2")
@Service
public class ReplicationPreprocessor2 implements Preprocessor {
@Override
public void preprocess(final ReplicationAction replicationAction, final ReplicationOptions replicationOptions)
throws ReplicationException {
// Do something
}
}
Solved! Go to Solution.
As far as I can see, all preprocessors are called as part of the replication in a loop. If you set "com.day.cq.replication.impl.ReplicatorImpl" to DEBUG, it will log the registering of the preprocessors, but sadly not the execution of the individual preprocessors.
But your code should work, and both preprocessors should be executed.
Jörg
As far as I can see, all preprocessors are called as part of the replication in a loop. If you set "com.day.cq.replication.impl.ReplicatorImpl" to DEBUG, it will log the registering of the preprocessors, but sadly not the execution of the individual preprocessors.
But your code should work, and both preprocessors should be executed.
Jörg
@Jörg, thank you for your reply.
I found the reason why the second and other preprocessors are not executed properly.
ReplicationPreprocessor1 is registered, but has the 'satisfied' status as a component. That is why other preprocessors did not launch in a loop.
So this is our internal issue.
Thank you a lot,
Andrii
Views
Replies
Total Likes