@Override
        public void onNextResult(Result result, FeedException error) {
            resultsReceived.incrementAndGet();
            if (error != null) {
                log.warning("Problems with feeding document "
                        + error.documentId().map(DocumentId::toString).orElse("<unknown>")
                        + ": " + error);
                errorsReceived.incrementAndGet();
            }
        }
Sample feeder demonstrating how to programmatically feed to a Vespa cluster.
vespa-feed-client-api/src/test/java/ai/vespa/feed/client/examples/JsonFileFeederExample.java