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
7e5db4a0
Commit
7e5db4a0
authored
May 12, 2022
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复等待时间
parent
81dff773
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
BeanDao.java
...util-mq/src/main/java/com/yanzuoguang/mq/dao/BeanDao.java
+3
-13
No files found.
yzg-util-mq/src/main/java/com/yanzuoguang/mq/dao/BeanDao.java
View file @
7e5db4a0
...
@@ -12,7 +12,6 @@ import org.springframework.stereotype.Component;
...
@@ -12,7 +12,6 @@ import org.springframework.stereotype.Component;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Properties
;
/**
/**
* 基本队列处理类
* 基本队列处理类
...
@@ -103,18 +102,9 @@ public class BeanDao {
...
@@ -103,18 +102,9 @@ public class BeanDao {
}
}
// 创建实体
// 创建实体
Queue
queueNew
=
new
Queue
(
queueName
,
true
,
false
,
false
,
params
);
Queue
queueNew
=
new
Queue
(
queueName
,
true
,
false
,
false
,
params
);
boolean
isCreateQueue
=
true
;
YzgTimeout
.
timeOut
(
BeanDao
.
class
,
"创建队列"
+
queueName
,
()
->
{
try
{
amqpAdmin
.
declareQueue
(
queueNew
);
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
));
}
// 将实体注册到上下文中
// 将实体注册到上下文中
register
(
key
,
queueNew
);
register
(
key
,
queueNew
);
// 重新获取实体
// 重新获取实体
...
...
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