Notification After Couchbase CRUD Operations


Hello all,

I appreciate you taking a moment to read my question. I’m very new to Couchbase, but this has been a great experience so far.

Here’s my dilemma:
Currently, in production, we have MongoDB running. My end goal is to have CouchbaseDB and MongoDB pass data back and forth seamlessly, as it isn’t feasible to move our prod server away from Mongo at this time. With Mongo, we can tail the oplog to monitor changes made, then send those changes to Couchbase accordingly. However, I can’t seem to find anywhere I can monitor changes made to Couchbase in, for example, a .NET application.

What tools do we have to monitor CRUD operations made to Couchbase? Do we simply use the log? Is there a best practice with this scenario?

I appreciate your help!



I may have answered my own question. It appears that the Sync Gateway has a /[db-name]/_changed API call that will show the most recent changes. Additionally, it appears that you can use /[db-name]/_changed?feed=continuous to open what appears to be an HTTP Socket that will have any changes posted continually. This avoids polling, creating a better workflow.

Can anyone validate that this is the best way to keep two different DB platforms (e.g. MongoDB/CouchbaseDB) in sync?




you might want to look into DatabaseChangeProtocol:

Our newest connectors usually use this. Like the Kafka connector


Note that as of this writing, the DCP interface is technically experimental for uses outside Couchbase’s internal needs (replication, XDCR, views). It can be okay and there are others using it-- support is pending testing.