Skip to content

Commit

Permalink
MODRS-194 Updating dependencies for Quesnelia
Browse files Browse the repository at this point in the history
  • Loading branch information
Vignesh-kalyanasundaram committed Mar 14, 2024
1 parent f916e27 commit 5b138a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/folio/rs/config/KafkaConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public ConcurrentKafkaListenerContainerFactory<String, DomainEvent> kafkaListene
var factory = new ConcurrentKafkaListenerContainerFactory<String, DomainEvent>();
factory.setBatchListener(true);
factory.setConsumerFactory(jsonNodeConsumerFactory());
factory.setCommonErrorHandler(new DefaultErrorHandler((exception, data) ->
log.error("Error in process with Exception {} and the record is {}", exception, data)));
factory.setCommonErrorHandler(new DefaultErrorHandler((exception, data) -> log.error(
"Error in process with Exception {} and the record is {}", exception, data)));
return factory;
}

private ConsumerFactory<String, DomainEvent> jsonNodeConsumerFactory() {
var deserializer = new JsonDeserializer<>(DomainEvent.class);
Map<String, Object> config = new HashMap<>(kafkaProperties.buildConsumerProperties());
Map<String, Object> config = new HashMap<>(kafkaProperties.buildConsumerProperties(null));
config.put(KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
config.put(VALUE_DESERIALIZER_CLASS_CONFIG, deserializer);
return new DefaultKafkaConsumerFactory<>(config, new StringDeserializer(), deserializer);
Expand Down

0 comments on commit 5b138a5

Please sign in to comment.