TAP client
hi,
We use couchbase in our application. we have a cluster of controllers writing to the db.
We need to make use of the TAP feature in order to do a DB pub-sub so that all controllers will know of changes made by any one controller.
Jtap seems to be deprecated and it is mentioned that the functionality is present in the couch client.
Can someone point me to a code sample to use a tap client.
Will the below example mentioned in jtap site now work in the couch client? Is there any documentation that says what APIs are available? What if I don't want the keys in a file, but want a java collection to iterate over?
Example: Creates a custom tap stream that will dump all key in a Membase server and send only the key names. All of the key names will be exported to a file named "results.txt"
TapStreamClient client = new TapStreamClient("10.1.5.102", 11210, "default", null);
Exporter exporter = new FileExporter("results.txt");
CustomStream tapListener = new CustomStream(exporter, "node1");
tapListener.keysOnly();
tapListener.doDump();
client.start(tapListener);
Thanks,
Bhuvana
Just cross linking to the answer given in the other forum, so others can find the answer:
http://www.couchbase.com/forums/thread/tap-client-pub-sub