DCP Stats VBucket-Seqno in Java SDK?

Hi guys,

I’ve been trying to hook up to the DCP feed to consume document updates, using the Kafka connector source as inspiration. I’ve succeeded in getting the feed started but run into the problem of determining the initial sequence number to ask as I’m currently getting the entire bucket streamed across when I subscribe (it seems Sync Gateway developers had the same issue as discussed here: https://github.com/couchbase/sync_gateway/issues/486). It seems I need to execute the stats vbucket-seqno command before I subscribe to get the latest sequence number per vbucket as described here: https://github.com/couchbaselabs/dcp-documentation/blob/master/documentation/commands/stats-vbucket-seqno.md but I can’t figure out how to do that using the Java API. Is this possible? Is there a reason why it’s a bad idea? I could fork the Java api repo and add the message type in there but would like to get some advice from the community first.

@daschl are you able to help here?

@zirzirikos this is something that is on the roadmap, but currently not implemented in the core. Also, keep in mind that this at this point is not open to the public (as an API) and deemend highly experimental (just sayin’) :wink:

@avsej is working on extending DCP support in core-io as we speak, I hope to share some more news sooner than later.

Thanks for the feedback @daschl

1 Like