How to get the collection and scope details of a mutation from DCP CLIENT

Hi @Karthikeyan,

Here are some resources to look at:

Java DCP client GitHub repo

Couchbase Elasticsearch connector GitHub repo (uses the DCP client)

DCP protocol documentation

Again, DCP is not an officially supported way for users to interact with Couchbase Server, and the Java DCP client library is not supported.

If you have specific questions, I’ll try to answer them if I have free time… but we’re probably getting close to the limit of the help I can provide for an unsupported library.


1 Like

thank you David .

I have few issues while querying data from couchbase collection.
I have 10M data with doc id’s from 1 to 10M
I fired a select query - SELECT *,META(doc).id as docId FROM src.scp1.col1 as doc;

  • here I get only partial documents,
    for example, I have 10M records in my cluster , and I get the items queried as

doc 1
doc 10
doc 100
doc 1000
doc 10000

and so on , I don’t get the doc 2, 3 and etc…

is there anything to do with my query?

Hi @Karthikeyan.

I would recommend creating a new topic in the N1QL category.


1 Like

hey David , is there any way in DCP using which we can know if a mutation is a update or insert?

No. The DCP protocol does not distinguish between the two.

1 Like

hey David , I Get this exception when I was firing select query, why is this happening

query : select meta(doc).id as docId from “+collectionName+” as doc offset “+offset+” limit 10000"
here the offset will be incremented by 10000 on each call

I Get this exception when I was firing select query, why is this happening

We’ll need to see the full stack trace. As text, please – not an image.

Please create a new topic for this question, and for each separate question.


@Karthikeyan Just a quick followup: DCP client version 0.42.0 was released today. It includes the fix for JDCP-222 so you can set custom DCP controls. It also includes a pre-defined control name for ENABLE_EXPIRY_OPCODE. I haven’t actually tried turning it on, so who knows if it works :-). If you have problems with it, please let me know in a separate topic.


1 Like

sure David ,
thanks for the follow up