File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
java/com/programming/videoService Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public class KafkaConsumerConfig {
1919 @ Bean
2020 public Map <String , Object > consumerConfigs () {
2121 Map <String , Object > props = new HashMap <>();
22- props .put (ConsumerConfig .BOOTSTRAP_SERVERS_CONFIG , "192.168.2.240 :9092" );
22+ props .put (ConsumerConfig .BOOTSTRAP_SERVERS_CONFIG , "192.168.120.131 :9092" );
2323 props .put (ConsumerConfig .GROUP_ID_CONFIG , "video-genres-group" ); // Tên group ID
2424 props .put (ConsumerConfig .KEY_DESERIALIZER_CLASS_CONFIG , StringDeserializer .class );
2525 props .put (ConsumerConfig .VALUE_DESERIALIZER_CLASS_CONFIG , StringDeserializer .class );
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public class KafkaProducerConfig {
1616 @ Bean
1717 public Map <String , Object > producerConfigs () {
1818 Map <String , Object > props = new HashMap <>();
19- props .put (ProducerConfig .BOOTSTRAP_SERVERS_CONFIG , "192.168.2.240 :9092" );
19+ props .put (ProducerConfig .BOOTSTRAP_SERVERS_CONFIG , "192.168.120.131 :9092" );
2020 props .put (ProducerConfig .KEY_SERIALIZER_CLASS_CONFIG , StringSerializer .class );
2121 props .put (ProducerConfig .VALUE_SERIALIZER_CLASS_CONFIG , StringSerializer .class );
2222 return props ;
Original file line number Diff line number Diff line change @@ -87,14 +87,14 @@ public class VideoService {
8787 public VideoService () {
8888 // Kafka Producer Configuration
8989 Properties producerProps = new Properties ();
90- producerProps .put (ProducerConfig .BOOTSTRAP_SERVERS_CONFIG , "192.168.120.131:30392 " );
90+ producerProps .put (ProducerConfig .BOOTSTRAP_SERVERS_CONFIG , "192.168.120.131:9092 " );
9191 producerProps .put (ProducerConfig .KEY_SERIALIZER_CLASS_CONFIG , StringSerializer .class .getName ());
9292 producerProps .put (ProducerConfig .VALUE_SERIALIZER_CLASS_CONFIG , StringSerializer .class .getName ());
9393 this .kafkaProducer = new KafkaProducer <>(producerProps );
9494
9595 // Kafka Consumer Configuration
9696 Properties consumerProps = new Properties ();
97- consumerProps .put (ConsumerConfig .BOOTSTRAP_SERVERS_CONFIG , "192.169.120.131:30392 " );
97+ consumerProps .put (ConsumerConfig .BOOTSTRAP_SERVERS_CONFIG , "192.169.120.131:9092 " );
9898 consumerProps .put (ConsumerConfig .GROUP_ID_CONFIG , "video-genres-group" );
9999 consumerProps .put (ConsumerConfig .KEY_DESERIALIZER_CLASS_CONFIG , StringDeserializer .class .getName ());
100100 consumerProps .put (ConsumerConfig .VALUE_DESERIALIZER_CLASS_CONFIG , StringDeserializer .class .getName ());
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ spring:
1010
1111
1212 kafka :
13- bootstrap-servers : 192.168.2.240 :9092
13+ bootstrap-servers : 192.168.120.131 :9092
1414 producer :
1515 key-serializer : org.apache.kafka.common.serialization.StringSerializer
1616 value-serializer : org.springframework.kafka.support.serializer.JsonSerializer
You can’t perform that action at this time.
0 commit comments