Hi All,
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();
uris.add(base);
TapClient tapClient = new TapClient(uris, “default”, “”);
TapStream op = tapClient.tapBackfill(“tapClient”, 0, TimeUnit.SECONDS);
System.out.println(tapClient.getMessagesRead());
while (tapClient.hasMoreMessages())
{
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.
Thanks,
SIva