Replication listner | Community
Skip to main content
Mohit1
Level 2
November 16, 2023
Solved

Replication listner

  • November 16, 2023
  • 3 replies
  • 827 views

I have one doubt that the replication listner will be called before the node reaches to replication queue or before that ?

or replication queue listens to replication queue itself?

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 arunpatidar

EventHandler objects are registered with the Framework service registry and are notified with an Event object when an event is sent or posted.

EventHandler objects can inspect the received Event object to determine its topic and properties.

 

So it hard to tell, if replication was triggered before/after the replication queue is created.

 

You can enable debug logs to track/check the replication queue vs your event handler

3 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
November 16, 2023

EventHandler objects are registered with the Framework service registry and are notified with an Event object when an event is sent or posted.

EventHandler objects can inspect the received Event object to determine its topic and properties.

 

So it hard to tell, if replication was triggered before/after the replication queue is created.

 

You can enable debug logs to track/check the replication queue vs your event handler

Arun Patidar
Harwinder-singh
Community Advisor
Community Advisor
November 17, 2023

@mohit1 Apache JackRabbit OAK implements asynchronous observation.

What that means is that the Event listener will see events after they occur and the transaction is committed.

In case of replication, this transaction is the replication event and in my opinion the transaction scope involves adding the item to the distribution queue.

You can check submit this as a question to the JackRabbit OAK or try other channels mentioned below to get an official answer.

https://jackrabbit.apache.org/oak/docs/participating.html

 

 

 

kautuk_sahni
Community Manager
Community Manager
November 20, 2023

@mohit1 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni