|
|
@ -64,11 +64,10 @@ public class KafkaSpecialProducerConsumerConfigExample {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
public ConsumerFactory<?, ?> kafkaConsumerFactory(KafkaProperties properties) {
|
|
|
|
public ConsumerFactory<?, ?> kafkaConsumerFactory(KafkaProperties properties) {
|
|
|
|
Map<String, Object> consumererProperties = properties
|
|
|
|
Map<String, Object> consumerProperties = properties.buildConsumerProperties();
|
|
|
|
.buildConsumerProperties();
|
|
|
|
consumerProperties.put(CommonClientConfigs.METRIC_REPORTER_CLASSES_CONFIG,
|
|
|
|
consumererProperties.put(CommonClientConfigs.METRIC_REPORTER_CLASSES_CONFIG,
|
|
|
|
|
|
|
|
MyConsumerMetricsReporter.class);
|
|
|
|
MyConsumerMetricsReporter.class);
|
|
|
|
return new DefaultKafkaConsumerFactory<Object, Object>(consumererProperties);
|
|
|
|
return new DefaultKafkaConsumerFactory<Object, Object>(consumerProperties);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|