Reverse Replication skipping items | Community
Skip to main content
New Participant
October 16, 2015
Solved

Reverse Replication skipping items

  • October 16, 2015
  • 5 replies
  • 1185 views

I have a custom servlet that captures a form submission and sets cq:lastModified, cq:lastModifiedBy and cq:distribute (to true).  I ran a few tests and i'm noticing that not all of the submitted content is being reverse replicated back to the author.  Out of 99 submissions, only 79 made it back to the author.  I checked the publish instances (there are 2), one has 49 posts and one has 50 posts.  Has anyone encountered this or have any help they could provide?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

this is the right way to do as all the UGC will be stored in 'outbox'

5 replies

leeaslingAuthor
New Participant
October 16, 2015

I saw this post https://forums.adobe.com/thread/1111532 and moved my save to before the reverse replicating node values were set and then obviously added another after - this didn't really help.  The next attempt i had 87 or 99 reverse replicated.

smacdonald2008
New Participant
October 16, 2015

Are you getting any log messages that provide clues about why not all content is being reserved replicated?  

leeaslingAuthor
New Participant
October 16, 2015

Not that are helpful.  I have an email service that triggers when a new submission comes in and i see that in certain cases these emails are being triggered but the *INFO* logs for creating an outbox item are not created, so to me that says that something is failing to trigger the reverse replication process.  The code is below for the reverse replication.

//Page/Node creation here session.save(); pageContainer.setProperty("hideInNav", true); pageContainer.setProperty("cq:lastModified", Calendar.getInstance()); pageContainer.setProperty("cq:lastModifiedBy", session.getUserID()); pageContainer.setProperty("cq:distribute", true); session.save();
leeaslingAuthor
New Participant
October 16, 2015

I switched up my code to use the replication service instead.  I found this example on Stackoverflow.  Once implemented, all of my submissions were successfully reverse replicated.  Is there any reason i shouldn't be using this method?

//pageContainer.setProperty("hideInNav", true); //pageContainer.setProperty("cq:lastModified", Calendar.getInstance()); //pageContainer.setProperty("cq:lastModifiedBy", session.getUserID()); //pageContainer.setProperty("cq:distribute", true); AgentIdFilter filter = new AgentIdFilter("outbox"); ReplicationOptions opts = new ReplicationOptions(); opts.setFilter(filter); replicator.replicate(session, ReplicationActionType.ACTIVATE, pageContainer.getPath(), opts);
Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
New Participant
October 16, 2015

this is the right way to do as all the UGC will be stored in 'outbox'