Created
December 16, 2017 12:39
-
-
Save skynyrd/06752b809813b18b209bcab70c7b8005 to your computer and use it in GitHub Desktop.
kafka_connect_put
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void put(Collection<SinkRecord> collection) { | |
try { | |
Collection<String> recordsAsString = collection.stream().map(r -> String.valueOf(r.value())).collect(Collectors.toList()); | |
elasticService.process(recordsAsString); | |
} | |
catch (Exception e) { | |
log.error("Error while processing records"); | |
log.error(e.toString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment