Merge branch 'master' of https://gitea.qinmian.online/a_bazu/cloud-server-8
commit
5a64054615
|
@ -23,5 +23,11 @@
|
|||
<artifactId>kafka-clients</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 项目公共核心 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -89,7 +89,6 @@
|
|||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-kafka</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.iotdb</groupId>
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.muyu.server.mqtt;
|
|||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import com.muyu.common.kafka.constants.KafkaConstants;
|
||||
import com.muyu.domain.CarMessage;
|
||||
import com.muyu.server.service.CarMessageService;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
|
@ -83,7 +82,7 @@ public class Demo {
|
|||
results[i] = futures.get(i).get();
|
||||
}
|
||||
String jsonString = JSONObject.toJSONString( results );
|
||||
ProducerRecord<String, String> producerRecord = new ProducerRecord<>( KafkaConstants.KafkaTopic, jsonString);
|
||||
ProducerRecord<String, String> producerRecord = new ProducerRecord<>( "carJsons", jsonString);
|
||||
kafkaProducer.send(producerRecord);
|
||||
}
|
||||
// 接收信息
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -42,6 +42,7 @@
|
|||
<hutool.version>5.8.27</hutool.version>
|
||||
<knife4j-openapi3.version>4.1.0</knife4j-openapi3.version>
|
||||
<xxl-job-core.version>2.4.1</xxl-job-core.version>
|
||||
<kafka.version>3.6.3</kafka.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
|
@ -218,6 +219,13 @@
|
|||
<version>${muyu.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--kafka-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-kafka</artifactId>
|
||||
<version>${kafka.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 分布式事务 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
|
|
Loading…
Reference in New Issue