mirror of https://github.com/ZhongFuCheng3y/austin
parent
92dc438450
commit
07276acc24
@ -1,30 +0,0 @@
|
||||
package com.java3y.austin.support.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.kafka.core.KafkaTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author 3y
|
||||
* @date 2022/2/16
|
||||
* Kafka工具类
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class KafkaUtils {
|
||||
|
||||
@Autowired
|
||||
private KafkaTemplate kafkaTemplate;
|
||||
|
||||
/**
|
||||
* 发送kafka消息
|
||||
*
|
||||
* @param topicName
|
||||
* @param jsonMessage
|
||||
*/
|
||||
public void send(String topicName, String jsonMessage) {
|
||||
kafkaTemplate.send(topicName, jsonMessage);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue