How to Connect/Subscribe to Sync Gateway using Stand alone Java program for GET /{db}/_changes

Connect to Sync Gateway using Stand alone Java program/Spring FrameWork, RESTFul API in Java for GET /{db}/_changes

Hi, we have a stand-alone C# (windows) service that listens for changes & resolves conflicts on the sever. We based it on this: https://developer.couchbase.com/documentation/mobile/current/guides/sync-gateway/resolving-conflicts/index.html

In our case:

  • the service listens for changes in the ADMIN interface (globally)
  • we throttle the number of changes using the limit param to avoid passing back huge datasets
  • we discovered an issue which we reported, so be aware of it: https://github.com/couchbase/sync_gateway/issues/2238
  • we use the POST instead of the GET method to avoid any possible issues with escaping params

I hope this helps.