regarding Java TAP API
I'm able to configure an TAPClient to a Couchbase server bucket and receiving the update notifications from the same. Below is the piece of Java code i have written:
URI base = new URI("http://10.0.0.9:8091/pools");
List uris = new LinkedList();
TapClient tapClient = new TapClient(uris, "default", "");
TapStream op = tapClient.tapBackfill("tapClient", 0, TimeUnit.SECONDS);
ResponseMessage response = tapClient.getNextMessage();
if (response != null)
System.out.println("UpdatedKey : "+response.getKey() );
This piece of code is working fine if we have single node in the cluster but if we have two nodes in a cluster it is giving duplicate messages i.e i'm receiving the updates for twice for the mutation of single document. Is this expected behavior of TAP protocol if we have multiple nodes configured in a cluster? If so is there a way to getaway with this problem and receive only one message per mutation?
Kindly share you thoughts on this.
Which version of the SDK and Couchbase Server are you using?
The current version of the TAP protocol and client sends messages for each mutation for the active and replicas. This is why in the cluster you see multiple events coming in.