Incorporated Review comments

This commit is contained in:
Amol Gote 2024-03-14 14:35:48 -04:00
parent 0a2d6823de
commit 2ef61a8884
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ public class KafkaConsumerConfig {
@Bean
public ConcurrentKafkaListenerContainerFactory<String, UserEvent> kafkaListenerContainerFactory() {
ConcurrentKafkaListenerContainerFactory<String, UserEvent> factory =
new ConcurrentKafkaListenerContainerFactory<>();
new ConcurrentKafkaListenerContainerFactory<>();
factory.setConsumerFactory(consumerFactory());
return factory;
}
@ -37,6 +37,6 @@ public class KafkaConsumerConfig {
props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
props.put(JsonDeserializer.TRUSTED_PACKAGES, "com.baeldung.spring.kafka.start.stop.consumer");
return new DefaultKafkaConsumerFactory<>(props, new StringDeserializer(),
new JsonDeserializer<>(UserEvent.class));
new JsonDeserializer<>(UserEvent.class));
}
}

View File

@ -1,4 +1,4 @@
package com.baeldung.spring.kafka.startstopconsumer;
package com.baeldung.spring.kafka.start.stop.consumer;
import com.baeldung.spring.kafka.start.stop.consumer.*;
import org.apache.kafka.clients.producer.KafkaProducer;