@@ -14,12 +14,8 @@ Licensed under MIT License Copyright (c) 2023 Raja Kolli.
14
14
import com .example .common .dtos .OrderDto ;
15
15
import com .example .orderservice .services .OrderManageService ;
16
16
import java .time .Duration ;
17
- import java .util .HashMap ;
18
- import java .util .Map ;
19
17
import java .util .Properties ;
20
- import org .apache .kafka .clients .producer .ProducerConfig ;
21
18
import org .apache .kafka .common .TopicPartition ;
22
- import org .apache .kafka .common .serialization .ByteArraySerializer ;
23
19
import org .apache .kafka .common .serialization .Serde ;
24
20
import org .apache .kafka .common .serialization .Serdes ;
25
21
import org .apache .kafka .streams .StreamsBuilder ;
@@ -35,13 +31,10 @@ Licensed under MIT License Copyright (c) 2023 Raja Kolli.
35
31
import org .apache .kafka .streams .state .Stores ;
36
32
import org .slf4j .Logger ;
37
33
import org .slf4j .LoggerFactory ;
38
- import org .springframework .boot .autoconfigure .kafka .KafkaConnectionDetails ;
39
- import org .springframework .boot .autoconfigure .kafka .KafkaProperties ;
40
34
import org .springframework .context .annotation .Bean ;
41
35
import org .springframework .context .annotation .Configuration ;
42
36
import org .springframework .kafka .annotation .EnableKafkaStreams ;
43
37
import org .springframework .kafka .config .StreamsBuilderFactoryBeanConfigurer ;
44
- import org .springframework .kafka .core .DefaultKafkaProducerFactory ;
45
38
import org .springframework .kafka .core .KafkaTemplate ;
46
39
import org .springframework .kafka .core .ProducerFactory ;
47
40
import org .springframework .kafka .listener .DeadLetterPublishingRecoverer ;
@@ -79,18 +72,6 @@ StreamsBuilderFactoryBeanConfigurer configurer(
79
72
};
80
73
}
81
74
82
- @ Bean
83
- ProducerFactory <byte [], byte []> bytesProducerFactory (
84
- KafkaProperties kafkaProperties , KafkaConnectionDetails connectionDetails ) {
85
- Map <String , Object > props = new HashMap <>(kafkaProperties .buildProducerProperties ());
86
- props .put (
87
- ProducerConfig .BOOTSTRAP_SERVERS_CONFIG ,
88
- connectionDetails .getStreamsBootstrapServers ());
89
- props .put (ProducerConfig .KEY_SERIALIZER_CLASS_CONFIG , ByteArraySerializer .class );
90
- props .put (ProducerConfig .VALUE_SERIALIZER_CLASS_CONFIG , ByteArraySerializer .class );
91
- return new DefaultKafkaProducerFactory <>(props );
92
- }
93
-
94
75
@ Bean
95
76
DeadLetterPublishingRecoverer deadLetterPublishingRecoverer (
96
77
ProducerFactory <byte [], byte []> producerFactory ) {
0 commit comments