how to delete an asset using the DAM update asset workflow in aem 6.1? -


i should able copy renditions of asset worker instance master instance , delete asset inthe worker instance using dam update asset offloading workflow

in opinion not practice update update asset workflow on worker instance -

  1. this whole offloading based on sling discovery , eventing mechanism. requires offloaded asset sent (read reverse replication) leader instance
  2. adding step within update asset workflow may cause issues reverse replication of asset.

you have build independent of offloading process achieve deletion. there multiple ways -

one possible way -

  • have jms based implementation monitor reverse replication
  • if reverse replication successful either delete asset or mark asset deletion (highly recommended)
  • if following approach of marking asset deletion, setup cleanup task run of worker instance (scheduled convenient time). cleanup task identifies assets marked deletion , processes them.

imho marking asset deletion better approach more performant , efficient. assets processed @ once during off-peak time.

there other ways require lot of custom code written.

updates -

tapping reverse replication -

you need details of working of reverse replication.

  • content reverse replicated pushed outbox
  • if @ /etc/replication/agents.publish/outbox/jcr:content on local instance, property transporturi default - repo://var/replication/outbox i.e. content reverse replicated pushed '/var/replication/outbox'
  • now @ /libs/cq/replication/components/revagent/revagent.jsp, logic works on receiving instance.

going through above give deeper understanding of how reverse replication working.

now have 2 options implement want -

  1. to check replication status, tap replication queue code in /libs/cq/replication/components/revagent/revagent.jsp doing. code executes on author instance content reverse replicated, in case leader instance. have works around code make work on worker instance. more specific on implementation code update line agent agent = agentmgr.getagents().get(id); id outbox agent id.
  2. have event listener monitor outbox. check payload comes replication , use functionality.

what have mentioned crude approach doesn't cover failover/recovery use-cases, i.e. how handle deletion if replication queue blocked reason , images have not been pushed leader.


Comments