Expand my Community achievements bar.

Reverse replication for delete event

Avatar

Level 3

Hi,

 

I am currently using reverse replication for add and modifying a node.

 

But I am not able to reverse replicate for delete node. Right now it only deletes on one publisher from where the delete request is submitted.

 

replicator.replicate(session, ReplicationActionType.DELETE, path)

 

I have couple of questions here

 

Should it be ReplicationActionType.DELETE or ReplicationActionType.DEACTIVATE ?

Secondly, what should be the path? should it be path of node to be deleted ?

 

Right now there are two launchers for create and modify events.

Do I need launcher for Delete event ?

 

Any help on this would be much appreciated.

 

Thanks

Harpreet

 

 

3 Replies

Avatar

Community Advisor

Hi @hptarora ,

There will be 2 aspects here: 

  1. Author Instance
    In ReplicationActionType.DELETE, it deletes  the node from repo and push/replicate the same to publisher as well while in ReplicationActionType.DEACTIVATE, the content or the node will still be available in author but it gets out of publisher. so in future when needed that content can be published again.
  2. Publisher Instance
    ReplicationActionType.DELETEReplicationActionType.DEACTIVATE are same.

Kindly, have a look at your replication queues and make sure they are not stuck in queue. and Yes, pathToDeactivate the node.

Additionally, worth checking about Content Distribution: https://sling.apache.org/documentation/bundles/content-distribution.html

Regards,

Santosh

Avatar

Level 3

Hi @SantoshSai , @Aditya_Chabuku 

Thank you for your reply. I tried using both ReplicationActionType.DELETE  and ReplicationActionType.DEACTIVATE but nothing works.

 

It doesn't show up in replication queues at all. It looks like doesn't trigger the replication.

 

It tried using Launcher for Delete but no luck.

 

Replication is working fine for create and modify but not working for delete.

Any idea why it isn't triggering the replication.

 

Thanks

Avatar

Community Advisor

Hi @hptarora You dont need a third Launcher to Delete, just use the modify one itself.

Thanks,

Aditya Chabuku