Expand my Community achievements bar.

SOLVED

Replication from Author to publish on /home/groups

Avatar

Level 3

Current  situation

I am using CQ5.6.1 . We have one author and 2 publish instance.

I made the below setting  mentioned below in the repository.xml   for all the above instances
 
<param name="groupMembershipSplitSize" value="5"/>
<param name="autoExpandTree" value="true"/>
<param name="autoExpandSize" value="6"/>

Now  I submit an form in publish  the Data gets stored  under /content/usergenerated in publish  and it is reverse replicated from the publish  instance  to Author .Now we have an even listener in Author  that creates the nodes /home/groups/xxx  in author ,it adds the email ids based on above configuration to /home/groups/xxx/dsm-forms-subscribers/rep:members/xxxxx

The actual node structure is:-

/home/groups/xxx/xxx-forms-subscribers
/home/groups/xxx/xxx-forms-subscribers/profile
/home/groups/xxx/xxx-forms-subscribers/rep:members
/home/groups/xxx/dsm-forms-subscribers/rep:members/aa.bbbb@xxx.com
/home/groups/xxx/dsm-forms-subscribers/rep:members/aa.bbbb20@xxx.com
/home/groups/xxx/dsm-forms-subscribers/rep:members/aas.bbbb30@xxx.com

Question:-
I need to replicate the partiuclar node  which has got  updated with the  latest email IDS from author  to both  publish instances 

So i meant if  the email ID got added to node /home/groups/xxx/dsm-forms-subscribers/rep:members/aa.bbbb@xxx.com then I would want to replicate
only this node. The problem i see is that the email IDS are  getting added randomly sometimes in  aa.bbbb@xxx.com and sometimes in  aa.bbbb20 to rep:members nodes .So can someone suggest  as what is way i could find the exact node where it got added??

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can use the event listeners and replicate to publish instance on 'NODE_ADDED' event. refer [1] for reference

[1] https://helpx.adobe.com/experience-manager/using/events.html

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

You can use the event listeners and replicate to publish instance on 'NODE_ADDED' event. refer [1] for reference

[1] https://helpx.adobe.com/experience-manager/using/events.html

Avatar

Level 3

Thanks for the reply

 

If the nodes had the structure and with properties like below

/home/groups/xxx/xxx-forms-subscribers/rep:members/aa.bbbb@xxx.com    .    rep:Members        
/home/groups/xxx/xxx-forms-subscribersrep:members/aa.bbbb@xxx.com/./**:jcr:mixinTypes    jcr:mixinTypes    Name[]        
/home/groups/xxx/xxx-forms-subscribers/rep:members/aa.bbbb@xxx.com/./jcr:primaryType    jcr:primaryType    Name    rep:Members    
/home/groups/xxx/xxx-forms-subscribers/rep:members/aa.bbbb@xxx.com/./aa.bbbb@xxx.com    WeakReference    e12f46cf-cd88-37d8-8fd0-fcbd5451fd69    
/home/groups/xxx/xxx-forms-subscribers/rep:members/aa.bbbb@xxx.com/./cc.ddd@xxx.com    WeakReference    9edf5365-ae1d-38f7-9b9f-a89f72971ac8

question:-

so did you mean that in  EventListener I need to add properties with listen.path = /home/groups/xxx
have  code like below

if (event.getType() == Event.NODE_ADDED || event.getType() == Event.PROPERTY_CHANGED) {....}