Commit a8b9be0a authored by yanzg's avatar yanzg

接口文档的支持

parent b95225bc
......@@ -14,6 +14,7 @@ import java.util.List;
/**
* 消息队列初始化服务,用于重启时,初始化消息队列对象
*
* @author 颜佐光
*/
@Component
......@@ -28,6 +29,11 @@ public class MqMessageInitPlan implements ThreadNext.Next, Runnable {
@Value("${yzg.mq.retry.time:60000}")
private int retryTime;
/**
* 是否为空
*/
private boolean empty = false;
public MqMessageInitPlan() {
ThreadNext.start(this, "message init error");
}
......@@ -44,6 +50,9 @@ public class MqMessageInitPlan implements ThreadNext.Next, Runnable {
@Override
public int getNextTime() {
if (!empty) {
return 0;
}
return retryTime;
}
......@@ -68,5 +77,7 @@ public class MqMessageInitPlan implements ThreadNext.Next, Runnable {
Log.error(MqMessageInitPlan.class, ex);
}
}
empty = messages.size() < retrySize;
}
}
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