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
626ac2f9
Commit
626ac2f9
authored
Dec 10, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载视频
parent
f63d85a1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
MqService.java
...q/src/main/java/com/yanzuoguang/mq/service/MqService.java
+12
-0
MessageSendServiceImpl.java
...m/yanzuoguang/mq/service/impl/MessageSendServiceImpl.java
+1
-1
MqServiceImpl.java
...n/java/com/yanzuoguang/mq/service/impl/MqServiceImpl.java
+14
-0
No files found.
yzg-util-mq/src/main/java/com/yanzuoguang/mq/service/MqService.java
View file @
626ac2f9
...
@@ -83,6 +83,18 @@ public interface MqService {
...
@@ -83,6 +83,18 @@ public interface MqService {
@ApiOperation
(
value
=
"动态注册消费者回调队列"
)
@ApiOperation
(
value
=
"动态注册消费者回调队列"
)
SimpleMessageListenerContainer
setQueueConsumer
(
String
queueName
,
int
concurrency
,
ChannelAwareMessageListener
messageListener
);
SimpleMessageListenerContainer
setQueueConsumer
(
String
queueName
,
int
concurrency
,
ChannelAwareMessageListener
messageListener
);
/**
* 动态注册消费者回调队列
*
* @param queueName 队列名称
* @param concurrency 消费者数量
* @param maxConcurrency 最大消费者数量
* @param messageListener 消费者
* @return
*/
@ApiOperation
(
value
=
"动态注册消费者回调队列"
)
SimpleMessageListenerContainer
setQueueConsumer
(
String
queueName
,
int
concurrency
,
int
maxConcurrency
,
ChannelAwareMessageListener
messageListener
);
/**
/**
* 建立当前服务器的队列
* 建立当前服务器的队列
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/service/impl/MessageSendServiceImpl.java
View file @
626ac2f9
...
@@ -176,7 +176,7 @@ public class MessageSendServiceImpl implements MessageSendService {
...
@@ -176,7 +176,7 @@ public class MessageSendServiceImpl implements MessageSendService {
*/
*/
@Override
@Override
public
SimpleMessageListenerContainer
init
(
String
queueName
,
int
concurrency
,
ChannelAwareMessageListener
messageListener
)
{
public
SimpleMessageListenerContainer
init
(
String
queueName
,
int
concurrency
,
ChannelAwareMessageListener
messageListener
)
{
return
this
.
init
(
queueName
,
concurrency
,
concurrency
,
messageListener
);
return
this
.
init
(
queueName
,
concurrency
,
0
,
messageListener
);
}
}
/**
/**
...
...
yzg-util-mq/src/main/java/com/yanzuoguang/mq/service/impl/MqServiceImpl.java
View file @
626ac2f9
...
@@ -126,6 +126,20 @@ public class MqServiceImpl implements MqService {
...
@@ -126,6 +126,20 @@ public class MqServiceImpl implements MqService {
return
this
.
messageSendService
.
init
(
queueName
,
concurrency
,
messageListener
);
return
this
.
messageSendService
.
init
(
queueName
,
concurrency
,
messageListener
);
}
}
/**
* 动态注册消费者回调队列
*
* @param queueName 队列名称
* @param concurrency 消费者数量
* @param maxConcurrency 最大消费者数量
* @param messageListener 消费者
* @return
*/
@Override
public
SimpleMessageListenerContainer
setQueueConsumer
(
String
queueName
,
int
concurrency
,
int
maxConcurrency
,
ChannelAwareMessageListener
messageListener
)
{
return
this
.
messageSendService
.
init
(
queueName
,
concurrency
,
maxConcurrency
,
messageListener
);
}
/**
/**
* 建立当前服务器的队列
* 建立当前服务器的队列
*
*
...
...
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