How to push a node from author to publish in real time on Adobe Cloud ?
I am working on AEM project to be deployed on Adobe cloud. I have a requirement that whenever a store data node of nt:unstructured type say "store1" on the path /content/data/stores/store1 is created in JCR on author, it should be pushed on publish instance as well automatically. I guess we can use sling content distribution (forward distribution) to achieve this ? Do I need to write any code to sync these changes from author to publish in real time ?
For example this is how I am saving a node on author using a servlet
Node rootNode = session.getNode("/content/data/stores");
storeNode = rootNode.addNode(storeId, "nt:unstructured");
// Set created date
Calendar created = Calendar.getInstance();
storeNode.setProperty("jcr:created", created);
Now I want to this new store node to be available on publish instance too in real time. Kindly guide regarding this.