How to get event for Query

Hi All,

Is there any way to get all events for N1QL. I am querying using Java SDK or Couchbase UI.

I want to listen events in JAVA.

Is DCP will help any how?


@bphalak1 yes DCP will, but its not something Couchbase supports officially, however you can use any of our connectors thats an abstraction on top of DCP or you can also use our Eventing service (you might want to reach out to your SDR for more info on Eventing).

Hi @AV25242

As per i know DCP is support Create/Update/Delete … i want event if i am using N1QL for SELECT query also. ?


Eventing like DCP is triggered by changes to data; a SELECT may not even consult a document (e.g. constants or covered queries).

There are no “events” in the Query service.

The closest to what it seems you’re after is to make use of auditing: N1QL Auditing | Couchbase Docs
(Also note it is an Enterprise Edition only feature: )

As its output is JSON format, it does integrate with anything able to process the format - which you could code your Java application to do. (Obviously it would have to be a server local administrator process, not just a random user client.)