|
@@ -62,20 +62,21 @@ public class ManualProjectConsumer {
|
|
@Value("${scheduler.linux-temp-path}")
|
|
@Value("${scheduler.linux-temp-path}")
|
|
String linuxTempPath;
|
|
String linuxTempPath;
|
|
|
|
|
|
-//
|
|
|
|
-// @KafkaListener(groupId = "simulation-resource-scheduler", topics = "${scheduler.manual-project.topic}")
|
|
|
|
-// public void testConsumer(ConsumerRecord<String, String> projectRecord) {
|
|
|
|
-// System.out.println("------- 消费成功:" + projectRecord.value());
|
|
|
|
-// }
|
|
|
|
|
|
+
|
|
|
|
+ @KafkaListener(groupId = "simulation-resource-scheduler", topics = "hello")
|
|
|
|
+ public void testConsumer(ConsumerRecord<String, String> projectRecord) {
|
|
|
|
+ System.out.println("------- 消费成功:" + projectRecord.value());
|
|
|
|
+ }
|
|
|
|
|
|
@KafkaListener(groupId = "simulation-resource-scheduler", topics = "${scheduler.manual-project.topic}")
|
|
@KafkaListener(groupId = "simulation-resource-scheduler", topics = "${scheduler.manual-project.topic}")
|
|
public void parseProject(ConsumerRecord<String, String> projectRecord) throws IOException, ApiException {
|
|
public void parseProject(ConsumerRecord<String, String> projectRecord) throws IOException, ApiException {
|
|
|
|
+ System.out.println("------- 接收到消息为:" + projectRecord);
|
|
//1 读取 kafka 的 project 信息
|
|
//1 读取 kafka 的 project 信息
|
|
/*
|
|
/*
|
|
{
|
|
{
|
|
"projectId": "sadfasdfs", // 项目 id
|
|
"projectId": "sadfasdfs", // 项目 id
|
|
"algorithmId": "sadfasdfs", // 算法 id
|
|
"algorithmId": "sadfasdfs", // 算法 id
|
|
- "vehicleId": "sadfasdfs", // 车辆 id
|
|
|
|
|
|
+ "vehicleConfigId": "sadfasdfs", // 车辆 id
|
|
"scenePackageId": "sadfasdfs", // 场景包 id
|
|
"scenePackageId": "sadfasdfs", // 场景包 id
|
|
"maxSimulationTime": 11111, // 最大仿真时间
|
|
"maxSimulationTime": 11111, // 最大仿真时间
|
|
"parallelism": 30 // 并行度
|
|
"parallelism": 30 // 并行度
|