Commit 7e5db4a0 authored by yanzg's avatar yanzg

修复等待时间

parent 81dff773
......@@ -12,7 +12,6 @@ import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
/**
* 基本队列处理类
......@@ -103,18 +102,9 @@ public class BeanDao {
}
// 创建实体
Queue queueNew = new Queue(queueName, true, false, false, params);
boolean isCreateQueue = true;
try {
Properties queueProperties = amqpAdmin.getQueueProperties(queueName);
isCreateQueue = !queueProperties.isEmpty();
} catch (Exception ex) {
if (ex != null) {
ex.printStackTrace();
}
}
if (isCreateQueue) {
YzgTimeout.timeOut(BeanDao.class, "创建队列" + queueName, () -> amqpAdmin.declareQueue(queueNew));
}
YzgTimeout.timeOut(BeanDao.class, "创建队列" + queueName, () -> {
amqpAdmin.declareQueue(queueNew);
});
// 将实体注册到上下文中
register(key, queueNew);
// 重新获取实体
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment