IDocumentStoreListener and Replication

25 views
Skip to first unread message

Ahmed

unread,
Oct 22, 2014, 10:45:02 AM10/22/14
to rav...@googlegroups.com

We are using Master-Master replication  as our application is deployed on 2 servers in a load balance environment. We want to execute some local machine related code when a specific document is created/edited.
The idea is to replicate data and some trigger will execute same code but on local respective machines (A&B). So we have put an IDocumentStoreListener and it works fine. Example:

user clicks save on UI while on server A, Listener is executed on A, Data is saved on A and replicated to Server B. But listener on B is not invoked

Question is does this listener will execute on server B?

My understanding from the documents is that it will not be executed on B but my boss feels I may have missed some hook or needs confirmation that listener in this scenario will not work on B

Thanks,


Kijana Woodard

unread,
Oct 22, 2014, 11:22:38 AM10/22/14
to rav...@googlegroups.com
I wouldn't think that one would often want a listener to be invoked for replication. The data being replicated has already passed through the listeners. 

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mauro Servienti

unread,
Oct 22, 2014, 11:24:06 AM10/22/14
to rav...@googlegroups.com
Yes, listeners work at the session level at the client side.

Sent from my Amazing not anymore Yellow Lumia, typos are guaranteed ;-)

From: Kijana Woodard
Sent: ‎22/‎10/‎2014 17:22
To: rav...@googlegroups.com
Subject: Re: [RavenDB] IDocumentStoreListener and Replication

Reply all
Reply to author
Forward
0 new messages