Incorporated Review comments
This commit is contained in:
parent
0a2d6823de
commit
2ef61a8884
@ -23,7 +23,7 @@ public class KafkaConsumerConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
public ConcurrentKafkaListenerContainerFactory<String, UserEvent> kafkaListenerContainerFactory() {
|
public ConcurrentKafkaListenerContainerFactory<String, UserEvent> kafkaListenerContainerFactory() {
|
||||||
ConcurrentKafkaListenerContainerFactory<String, UserEvent> factory =
|
ConcurrentKafkaListenerContainerFactory<String, UserEvent> factory =
|
||||||
new ConcurrentKafkaListenerContainerFactory<>();
|
new ConcurrentKafkaListenerContainerFactory<>();
|
||||||
factory.setConsumerFactory(consumerFactory());
|
factory.setConsumerFactory(consumerFactory());
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
@ -37,6 +37,6 @@ public class KafkaConsumerConfig {
|
|||||||
props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
|
props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
|
||||||
props.put(JsonDeserializer.TRUSTED_PACKAGES, "com.baeldung.spring.kafka.start.stop.consumer");
|
props.put(JsonDeserializer.TRUSTED_PACKAGES, "com.baeldung.spring.kafka.start.stop.consumer");
|
||||||
return new DefaultKafkaConsumerFactory<>(props, new StringDeserializer(),
|
return new DefaultKafkaConsumerFactory<>(props, new StringDeserializer(),
|
||||||
new JsonDeserializer<>(UserEvent.class));
|
new JsonDeserializer<>(UserEvent.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 com.baeldung.spring.kafka.start.stop.consumer.*;
|
||||||
import org.apache.kafka.clients.producer.KafkaProducer;
|
import org.apache.kafka.clients.producer.KafkaProducer;
|
Loading…
x
Reference in New Issue
Block a user