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
353c94ec
Commit
353c94ec
authored
May 11, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口文档的支持
parent
e83d2ada
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
7 deletions
+29
-7
MqService.java
...q/src/main/java/com/yanzuoguang/mq/service/MqService.java
+13
-4
MqServiceImpl.java
...n/java/com/yanzuoguang/mq/service/impl/MqServiceImpl.java
+16
-3
No files found.
yzg-util-mq/src/main/java/com/yanzuoguang/mq/service/MqService.java
View file @
353c94ec
...
...
@@ -64,10 +64,9 @@ public interface MqService {
void
basicAck
(
Message
message
,
Channel
channel
);
/**
*
* 删除当前服务器的队列
*
* @param req
请求数据
* @param req 请求数据
* @return
*/
String
removeServerQueue
(
ServerQueueReqVo
req
);
...
...
@@ -76,11 +75,20 @@ public interface MqService {
* 建立当前服务器的队列
*
* @param req 请求数据
* @param listener 处理函数
* @return
*/
@ApiOperation
(
value
=
"建立当前服务器的队列"
)
String
createServerQueue
(
ServerQueueReqVo
req
,
ChannelAwareMessageListener
listener
);
String
createServerQueue
(
ServerQueueReqVo
req
);
/**
* 注册当前消费队列的回调
*
* @param req 请求数据
* @param listener 处理函数
* @return
*/
@ApiOperation
(
value
=
"注册当前消费队列的回调"
)
String
setServerQueueConsumer
(
ServerQueueReqVo
req
,
ChannelAwareMessageListener
listener
);
/**
* 注册当前服务器的token,超期后需要重新注册
...
...
@@ -93,6 +101,7 @@ public interface MqService {
/**
* 删除token的执行
*
* @param req
*/
@ApiOperation
(
value
=
"删除token的执行"
)
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/service/impl/MqServiceImpl.java
View file @
353c94ec
...
...
@@ -178,11 +178,10 @@ public class MqServiceImpl implements MqService {
* 建立当前服务器的队列
*
* @param req 请求数据
* @param listener 处理函数
* @return
*/
@Override
public
String
createServerQueue
(
ServerQueueReqVo
req
,
ChannelAwareMessageListener
listener
)
{
public
String
createServerQueue
(
ServerQueueReqVo
req
)
{
String
queueName
=
req
.
getQueueName
();
String
localQueueName
=
this
.
getLocalName
(
req
.
getQueueName
());
String
serverId
=
StringHelper
.
getMD5Id
(
localQueueName
);
...
...
@@ -203,7 +202,6 @@ public class MqServiceImpl implements MqService {
}
}
});
this
.
mqConsumeDynamic
.
init
(
localQueueName
,
listener
);
QueueServerVo
vo
=
new
QueueServerVo
();
vo
.
setServerId
(
serverId
);
...
...
@@ -214,6 +212,21 @@ public class MqServiceImpl implements MqService {
return
"创建成功"
;
}
/**
* 注册当前消费队列的回调
*
* @param req 请求数据
* @param listener 处理函数
* @return
*/
@Override
public
String
setServerQueueConsumer
(
ServerQueueReqVo
req
,
ChannelAwareMessageListener
listener
)
{
String
queueName
=
req
.
getQueueName
();
String
localQueueName
=
this
.
getLocalName
(
req
.
getQueueName
());
this
.
mqConsumeDynamic
.
init
(
localQueueName
,
listener
);
return
"注册成功"
;
}
/**
* 注册当前服务器的token,超期后需要重新注册
*
...
...
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