Hi I am doing the insert bulk operation.
List<JsonDocument> success = Collections.synchronizedList(new ArrayList<JsonDocument>());
Observable
.from(documents)
.flatMap(document -> connection.getBucket().async().insert(document))
.doOnNext(doc -> success.add(doc))
.doOnError(err -> logger.error("Labham -", err))
.last()
.toBlocking()
.single();
In the above method, I am able to create successfully list of success in inserting document but is there a way so that i can create a map<key, Throwable> failure; so that for the failed docs i can map them to there whatever exception is thrown by couchbase.
Couchbase - 4.1.0-5005 Community Edition Java. 1.8 and couchbase-Client --> 2.4.3