//package com.yeejoin.amos.api.alarm.service.impl;
//
//import com.alibaba.fastjson.JSON;
//import org.apache.kafka.clients.admin.NewTopic;
//import org.apache.kafka.clients.producer.ProducerRecord;
//import org.checkerframework.checker.units.qual.K;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.kafka.core.KafkaTemplate;
//import org.springframework.kafka.support.SendResult;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Service;
//import org.springframework.util.concurrent.ListenableFuture;
//import org.springframework.util.concurrent.ListenableFutureCallback;
//
//import javax.annotation.PostConstruct;
//import javax.annotation.Resource;
//
///**
// * @description:
// * @author: tw
// * @createDate: 2023/6/28
// */
//@Service
//public class producerServers {
//
//
//    @Autowired
//    private KafkaTemplate<String, String> kafkaTemplate;
//
//@Scheduled(fixedRate = 60000)
// public void send(){
//     String gg1="1668801435891929089@18873";
//     String gg2="1668801435891929089@18874";
//     String gg3="1668801435891929089@18875";
//     String gg4="1668801435891929089@18876";
//     String gg5="1668801435891929089@18877";
//     String gg6="1668801435891929089@18878";
//     String gg7="1668801435891929089@18879";
//     String gg8="1668801435891929089@18880";
//
//
//    String topic="jf1";
//
//    ProducerRecord<String, String> producerRecord1 = new ProducerRecord<String, String>( topic,  gg1.hashCode()%3, gg1.hashCode()%3+"", gg1+"==============="+gg1.hashCode()%5);
//    ProducerRecord<String, String> producerRecord2 = new ProducerRecord<String, String>( topic,  gg2.hashCode()%3,gg2.hashCode()%3+"", gg2+"==============="+gg2.hashCode()%5);
//    ProducerRecord<String, String> producerRecord3 = new ProducerRecord<String, String>( topic,  gg3.hashCode()%3,gg3.hashCode()%3+"", gg3+"==============="+gg3.hashCode()%5);
//    ProducerRecord<String, String> producerRecord4 = new ProducerRecord<String, String>( topic,  gg4.hashCode()%3,gg4.hashCode()%3+"", gg4+"==============="+gg4.hashCode()%5);
//    ProducerRecord<String, String> producerRecord5 = new ProducerRecord<String, String>( topic,  gg5.hashCode()%3,gg5.hashCode()%3+"", gg5+"==============="+gg5.hashCode()%5);
//    ProducerRecord<String, String> producerRecord6 = new ProducerRecord<String, String>( topic,  gg6.hashCode()%3,gg6.hashCode()%3+"", gg6+"==============="+gg6.hashCode()%5);
//    ProducerRecord<String, String> producerRecord7 = new ProducerRecord<String, String>( topic,  gg7.hashCode()%3,gg7.hashCode()%3+"", gg7+"==============="+gg7.hashCode()%5);
//    ProducerRecord<String, String> producerRecord8 = new ProducerRecord<String, String>( topic,  gg8.hashCode()%3,gg8.hashCode()%3+"", gg8+"==============="+gg8.hashCode()%5);
//
//    System.out.println(gg1.hashCode()%3);
//    System.out.println(gg2.hashCode()%3);
//    System.out.println(gg3.hashCode()%3);
//    System.out.println(gg4.hashCode()%3);
//    System.out.println(gg5.hashCode()%3);
//    System.out.println(gg6.hashCode()%3);
//    System.out.println(gg7.hashCode()%3);
//    System.out.println(gg8.hashCode()%3);
//
//    kafkaTemplate.send(producerRecord1);
//    kafkaTemplate.send(producerRecord2);
//    kafkaTemplate.send(producerRecord3);
//    kafkaTemplate.send(producerRecord4);
//    kafkaTemplate.send(producerRecord5);
//    kafkaTemplate.send(producerRecord6);
//    kafkaTemplate.send(producerRecord7);
//    kafkaTemplate.send(producerRecord8);
//
//
//
//
// }
//
//
//
//
//
//}
