package org.well.well.kafka;

import com.alibaba.fastjson.JSONObject;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.kafka.listener.MessageListener;

public class TopicApiUseKafkaListener implements MessageListener<String, String> {
    private static final Logger LOGGER = LoggerFactory.getLogger(TopicApiUseKafkaListener.class);

    private static final String TABLE_PRE = "";

    @Override
    public void onMessage(ConsumerRecord<String, String> stringStringConsumerRecord) {

        String value = stringStringConsumerRecord.value();
        JSONObject bodyJson = JSONObject.parseObject(value);

        Integer platform = bodyJson.getInteger("platform");
        String url = bodyJson.getString("url");
        String apiVersion = bodyJson.getString("apiVersion");
        String createDate = bodyJson.getString("createDate");


    }

}
