// Path: cn.ctodb.push.server/src/main/java/cn/ctodb/push/server/kafka/KafkaConsumer.java
// public class KafkaConsumer {
// 
//     private Logger logger = LoggerFactory.getLogger(KafkaConsumer.class);
// 
//     @KafkaListener(topics = {"test-topic"})
//     public void listen(ConsumerRecord<?, ?> record) {
//         logger.debug("listen1 ");
//         Optional<?> kafkaMessage = Optional.ofNullable(record.value());
//         if (kafkaMessage.isPresent()) {
//             Object message = kafkaMessage.get();
//             logger.debug("listen1 : {}", message);
//         }
//     }
// }


import cn.ctodb.push.server.kafka.KafkaConsumer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.EnableKafka;
package cn.ctodb.push.server.conf;


/**
 * All rights Reserved, Designed By www.ctodb.cn
 *
 * @version V1.0
 * @author: lichaohn@163.com
 * @Copyright: 2018 www.ctodb.cn Inc. All rights reserved.
 */
// @Configuration
@EnableKafka
public class KafkaConfiguration {

    @Bean
// Path: cn.ctodb.push.server/src/main/java/cn/ctodb/push/server/kafka/KafkaConsumer.java
// public class KafkaConsumer {
// 
//     private Logger logger = LoggerFactory.getLogger(KafkaConsumer.class);
// 
//     @KafkaListener(topics = {"test-topic"})
//     public void listen(ConsumerRecord<?, ?> record) {
//         logger.debug("listen1 ");
//         Optional<?> kafkaMessage = Optional.ofNullable(record.value());
//         if (kafkaMessage.isPresent()) {
//             Object message = kafkaMessage.get();
//             logger.debug("listen1 : {}", message);
//         }
//     }
// }


// Path: cn.ctodb.push.server/src/main/java/cn/ctodb/push/server/conf/KafkaConfiguration.java
import cn.ctodb.push.server.kafka.KafkaConsumer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.EnableKafka;

package cn.ctodb.push.server.conf;


/**
 * All rights Reserved, Designed By www.ctodb.cn
 *
 * @version V1.0
 * @author: lichaohn@163.com
 * @Copyright: 2018 www.ctodb.cn Inc. All rights reserved.
 */
// @Configuration
@EnableKafka
public class KafkaConfiguration {

    @Bean
    public KafkaConsumer kafkaProduct() {