Expand my Community achievements bar.

SOLVED

Replication listner

Avatar

Level 2

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

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

Avatar

Community Advisor

@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

 

 

 

Avatar

Administrator

@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