Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
a8b9be0a
Commit
a8b9be0a
authored
Sep 30, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口文档的支持
parent
b95225bc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
MqMessageInitPlan.java
.../main/java/com/yanzuoguang/mq/plan/MqMessageInitPlan.java
+11
-0
No files found.
yzg-util-mq/src/main/java/com/yanzuoguang/mq/plan/MqMessageInitPlan.java
View file @
a8b9be0a
...
@@ -14,6 +14,7 @@ import java.util.List;
...
@@ -14,6 +14,7 @@ import java.util.List;
/**
/**
* 消息队列初始化服务,用于重启时,初始化消息队列对象
* 消息队列初始化服务,用于重启时,初始化消息队列对象
*
* @author 颜佐光
* @author 颜佐光
*/
*/
@Component
@Component
...
@@ -28,6 +29,11 @@ public class MqMessageInitPlan implements ThreadNext.Next, Runnable {
...
@@ -28,6 +29,11 @@ public class MqMessageInitPlan implements ThreadNext.Next, Runnable {
@Value
(
"${yzg.mq.retry.time:60000}"
)
@Value
(
"${yzg.mq.retry.time:60000}"
)
private
int
retryTime
;
private
int
retryTime
;
/**
* 是否为空
*/
private
boolean
empty
=
false
;
public
MqMessageInitPlan
()
{
public
MqMessageInitPlan
()
{
ThreadNext
.
start
(
this
,
"message init error"
);
ThreadNext
.
start
(
this
,
"message init error"
);
}
}
...
@@ -44,6 +50,9 @@ public class MqMessageInitPlan implements ThreadNext.Next, Runnable {
...
@@ -44,6 +50,9 @@ public class MqMessageInitPlan implements ThreadNext.Next, Runnable {
@Override
@Override
public
int
getNextTime
()
{
public
int
getNextTime
()
{
if
(!
empty
)
{
return
0
;
}
return
retryTime
;
return
retryTime
;
}
}
...
@@ -68,5 +77,7 @@ public class MqMessageInitPlan implements ThreadNext.Next, Runnable {
...
@@ -68,5 +77,7 @@ public class MqMessageInitPlan implements ThreadNext.Next, Runnable {
Log
.
error
(
MqMessageInitPlan
.
class
,
ex
);
Log
.
error
(
MqMessageInitPlan
.
class
,
ex
);
}
}
}
}
empty
=
messages
.
size
()
<
retrySize
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment