Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge dev to test #71

Merged
merged 13 commits into from
Dec 20, 2023
4 changes: 3 additions & 1 deletion src/main/java/fr/abes/kbart2kafka/service/FileService.java
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ private void executeMultiThread(File fichier, String kbartHeader) throws IOExcep
try (BufferedReader buff = new BufferedReader(new FileReader(fichier))) {
List<String> fileContent = buff.lines().toList();
Integer nbLignesFichier = fileContent.size() - 1;
log.debug("Début d'envoi de "+ nbLignesFichier + " lignes du fichier");
for (String ligneKbart : fileContent) {
lineCounter++;
if (!ligneKbart.contains(kbartHeader)) {
@@ -90,7 +91,8 @@ private void executeMultiThread(File fichier, String kbartHeader) throws IOExcep
assert result != null;
result.whenComplete((sr, ex) -> {
try {
log.debug("Message envoyé : {}", mapper.writeValueAsString(result.get().getProducerRecord().value()));
// log.debug("Message envoyé : {}", mapper.writeValueAsString(result.get().getProducerRecord().value()));
mapper.writeValueAsString(result.get().getProducerRecord().value());
} catch (JsonProcessingException | InterruptedException | ExecutionException e) {
log.warn("Erreur dans le mapping du résultat de l'envoi dans le topic pour la ligne " + ligneKbartDto);
}
Loading