couchbase / couchbase-lite-java-listener

Embedded web server to expose Couchbase Lite REST API on an http socket
Apache License 2.0
12 stars 32 forks source link

set Heatbeat Value to changetracker from REST. #76

Open NitzDKoder opened 7 years ago

NitzDKoder commented 7 years ago

Hi All,

1)Phonegap app talking to CBL local WEB sever.

2)Setting _changes request Heatbeat value to random value(30 secs, 1 min, 2 mins , 5 mins).

http://developer.couchbase.com/documentation/mobile/1.1.0/develop/references/couchbase-lite/rest-api/database/get-changes/index.html

is this heatbeat value to remote cbsyncgatway or to CBL local WEB sever?

3)Seems the value set from REST is not taken and default 30 secs is taken as hearbeat value ,when requesting cbsyncgatway.

https://github.com/couchbase/couchbase-lite-java-core/search?utf8=%E2%9C%93&q=heartbeat

4) java Replication.DEFAULT_HEARTBEAT = random value(30 secs, 1 min, 2 mins , 5 mins) Works.

5)How set Heatbeat Value to changetracker from REST/JS level?

Thanks Nithin

NitzDKoder commented 7 years ago

@hideki any inputs on this?

hideki commented 7 years ago

Hi @NitzDKoder,

If your application calls /_changes REST API with feed=longpoll and heartbeat=, web server sends CRLF "\r\n" every milliseconds.

Currently you can not change default heartbeat value setting for Replicator. Pull replicator calls Sync Gateway with heartbeat=30000.

Thanks!