|
@@ -0,0 +1,66 @@
|
|
|
+package com.fdkankan.contro.mq.listener;
|
|
|
+
|
|
|
+import com.fdkankan.contro.mq.service.impl.BuildObjServiceImpl;
|
|
|
+import com.rabbitmq.client.Channel;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.amqp.core.Message;
|
|
|
+import org.springframework.amqp.rabbit.annotation.Queue;
|
|
|
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * TODO
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author dengsixing
|
|
|
+ * @since 2022/4/19
|
|
|
+ **/
|
|
|
+@Slf4j
|
|
|
+@Component
|
|
|
+public class BuildObjListener extends AbstrackBuildSceneListener {
|
|
|
+
|
|
|
+
|
|
|
+ @Value("${queue.modeling.obj.modeling-pre}")
|
|
|
+ private String queueObjModelingPre;
|
|
|
+ @Value("${queue.modeling.obj.modeling-post}")
|
|
|
+ private String queueObjModelingPost;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private BuildObjServiceImpl buildObjService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 场景计算前置资源准备处理
|
|
|
+ *
|
|
|
+ * @param channel
|
|
|
+ * @param message
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @RabbitListener(
|
|
|
+ queuesToDeclare = @Queue("${queue.modeling.obj.modeling-pre}"),
|
|
|
+ concurrency = "${maxThread.modeling.modeling-pre}"
|
|
|
+ )
|
|
|
+ public void buildObjScenePreHandler(Channel channel, Message message) throws Exception {
|
|
|
+ preHandle(channel, queueObjModelingPre, message, buildObjService);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 场景计算后置结果处理
|
|
|
+ *
|
|
|
+ * @param channel
|
|
|
+ * @param message
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @RabbitListener(
|
|
|
+ queuesToDeclare = @Queue("${queue.modeling.obj.modeling-post}"),
|
|
|
+ concurrency = "${maxThread.modeling.modeling-post}"
|
|
|
+ )
|
|
|
+ public void buildObjScenePostHandler(Channel channel, Message message) throws Exception {
|
|
|
+ postHandle(channel, queueObjModelingPost, message, buildObjService);
|
|
|
+
|
|
|
+ }
|
|
|
+}
|