|
@@ -0,0 +1,34 @@
|
|
|
+package com.fdkankan.download.listener;
|
|
|
+
|
|
|
+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.Value;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@Component
|
|
|
+public class RsyncSceneListener {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 场景计算状态日志记录
|
|
|
+ * @param channel
|
|
|
+ * @param message
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+// @RabbitListener(
|
|
|
+// queuesToDeclare = @Queue("rsync-scene"),
|
|
|
+// concurrency = "2"
|
|
|
+// )
|
|
|
+// public void buildScenePreHandler(Channel channel, Message message) throws Exception {
|
|
|
+// String msg = new String(message.getBody(), StandardCharsets.UTF_8);
|
|
|
+// System.out.println(msg);
|
|
|
+// Thread.sleep(60000L);
|
|
|
+// channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
|
|
|
+// }
|
|
|
+
|
|
|
+}
|