Skip to content

Commit

Permalink
fix topic gestion listeneur
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelQuetin committed Oct 26, 2023
1 parent 83b721c commit e2014b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Empty file.
4 changes: 2 additions & 2 deletions src/main/java/fr/abes/logskbart/kafka/LogsListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class LogsListener {
@KafkaListener(topics = {"errorkbart2kafka", "bestppn.endoftraitment"}, groupId = "logskbart", containerFactory = "kafkaLogsListenerContainerFactory")
public void listenInfoKbart2KafkaAndErrorKbart2Kafka(ConsumerRecord<String, String> message) throws IOException {

if (!message.value().equals("OK")) {
if (message.topic().equals("errorkbart2kafka")) {
Kbart2KafkaDto dto = mapper.readValue(message.value(), Kbart2KafkaDto.class);
LogKbart entity = logsMapper.map(dto, LogKbart.class);
Timestamp timestamp = new Timestamp(message.timestamp());
Expand Down Expand Up @@ -79,7 +79,7 @@ public void listenInfoKbart2KafkaAndErrorKbart2Kafka(ConsumerRecord<String, Stri
// Inscrit l'entity en BDD
repository.save(entity);

} else if (message.value().equals("OK")) { // Si la ligne sur le topic bestppn.endoftraitment contient OK
} else { // Si la ligne sur le topic bestppn.endoftraitment contient OK

// Créer un nouveau Path avec le FileName (en remplaçant l'extension par .err)
Path source = null;
Expand Down

0 comments on commit e2014b7

Please sign in to comment.