Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
ccd51cb9
Commit
ccd51cb9
authored
Nov 21, 2024
by
honghy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改发送消息变更为集群消费,增加打印日志
parent
8c92088d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
YudaoMQAutoConfiguration.java
...r/yudao/framework/mq/config/YudaoMQAutoConfiguration.java
+2
-0
SmsSendConsumerV2.java
...udao/module/system/mq/consumer/sms/SmsSendConsumerV2.java
+2
-2
SmsSendMessageV2.java
.../yudao/module/system/mq/message/sms/SmsSendMessageV2.java
+4
-4
No files found.
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java
View file @
ccd51cb9
...
...
@@ -111,6 +111,8 @@ public class YudaoMQAutoConfiguration {
.
autoAcknowledge
(
false
)
// 不自动 ack
.
cancelOnError
(
throwable
->
false
);
// 默认配置,发生异常就取消消费,显然不符合预期;因此,我们设置为 false
container
.
register
(
builder
.
build
(),
listener
);
log
.
info
(
"[redisMessageListenerContainer][注册 streamKey({}) 对应的监听器({})]"
,
listener
.
getStreamKey
(),
listener
.
getClass
().
getName
());
});
return
container
;
}
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsSendConsumerV2.java
View file @
ccd51cb9
package
cn
.
iocoder
.
yudao
.
module
.
system
.
mq
.
consumer
.
sms
;
import
cn.iocoder.yudao.framework.mq.core.
pubsub.AbstractChannel
MessageListener
;
import
cn.iocoder.yudao.framework.mq.core.
stream.AbstractStream
MessageListener
;
import
cn.iocoder.yudao.module.system.mq.message.sms.SmsSendMessageV2
;
import
cn.iocoder.yudao.module.system.service.sms.SmsSendService
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -15,7 +15,7 @@ import javax.annotation.Resource;
*/
@Component
@Slf4j
public
class
SmsSendConsumerV2
extends
Abstract
Channel
MessageListener
<
SmsSendMessageV2
>
{
public
class
SmsSendConsumerV2
extends
Abstract
Stream
MessageListener
<
SmsSendMessageV2
>
{
@Resource
private
SmsSendService
smsSendService
;
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SmsSendMessageV2.java
View file @
ccd51cb9
package
cn
.
iocoder
.
yudao
.
module
.
system
.
mq
.
message
.
sms
;
import
cn.iocoder.yudao.framework.common.util.json.core.KeyValue
;
import
cn.iocoder.yudao.framework.mq.core.
pubsub.AbstractChannel
Message
;
import
cn.iocoder.yudao.framework.mq.core.
stream.AbstractStream
Message
;
import
cn.iocoder.yudao.framework.sms.core.client.dto.SmsTemplateDTO
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -16,7 +16,7 @@ import java.util.List;
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
SmsSendMessageV2
extends
Abstract
Channel
Message
{
public
class
SmsSendMessageV2
extends
Abstract
Stream
Message
{
/**
* 短信日志编号
...
...
@@ -42,8 +42,8 @@ public class SmsSendMessageV2 extends AbstractChannelMessage {
private
List
<
KeyValue
<
String
,
Object
>>
templateParams
;
@Override
public
String
get
Channel
()
{
return
"system.sms.send"
;
public
String
get
StreamKey
()
{
return
"system.sms.send
.v2
"
;
}
}
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