Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
0acbf836
提交
0acbf836
编写于
11月 29, 2022
作者:
hebao@lab.ibiz5.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
推送MQ消息日志记录(log trace文件)
上级
77ca7d4a
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
4 行增加
和
2 行删除
+4
-2
DefaultMQProducerService.java
...bizlab/core/extensions/util/DefaultMQProducerService.java
+4
-2
未找到文件。
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/util/DefaultMQProducerService.java
浏览文件 @
0acbf836
...
@@ -46,6 +46,7 @@ public class DefaultMQProducerService implements MsgProducerService{
...
@@ -46,6 +46,7 @@ public class DefaultMQProducerService implements MsgProducerService{
@Override
@Override
public
void
sendEngineMsg
(
EngineMQMsg
engineMQMsg
)
{
public
void
sendEngineMsg
(
EngineMQMsg
engineMQMsg
)
{
String
msg
=
JSON
.
toJSONString
(
engineMQMsg
);
String
msg
=
JSON
.
toJSONString
(
engineMQMsg
);
log
.
trace
(
String
.
format
(
"sendEngineMsg:%1$s"
,
msg
));
dstRocketMQTemplate
.
asyncSendOrderly
(
ruleEngineTopic
+
":Engine"
,
msg
,
DigestUtils
.
md5DigestAsHex
(
msg
.
getBytes
()),
new
SendCallback
(){
dstRocketMQTemplate
.
asyncSendOrderly
(
ruleEngineTopic
+
":Engine"
,
msg
,
DigestUtils
.
md5DigestAsHex
(
msg
.
getBytes
()),
new
SendCallback
(){
@Override
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
public
void
onSuccess
(
SendResult
sendResult
)
{
...
@@ -64,6 +65,7 @@ public class DefaultMQProducerService implements MsgProducerService{
...
@@ -64,6 +65,7 @@ public class DefaultMQProducerService implements MsgProducerService{
@Override
@Override
public
void
sendBuildMsg
(
EngineMQMsg
engineMQMsg
)
{
public
void
sendBuildMsg
(
EngineMQMsg
engineMQMsg
)
{
String
msg
=
JSON
.
toJSONString
(
engineMQMsg
);
String
msg
=
JSON
.
toJSONString
(
engineMQMsg
);
log
.
trace
(
String
.
format
(
"sendBuildMsg:%1$s"
,
msg
));
dstRocketMQTemplate
.
asyncSendOrderly
(
ruleEngineTopic
+
":Build"
,
msg
,
DigestUtils
.
md5DigestAsHex
(
msg
.
getBytes
()),
new
SendCallback
(){
dstRocketMQTemplate
.
asyncSendOrderly
(
ruleEngineTopic
+
":Build"
,
msg
,
DigestUtils
.
md5DigestAsHex
(
msg
.
getBytes
()),
new
SendCallback
(){
@Override
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
public
void
onSuccess
(
SendResult
sendResult
)
{
...
@@ -81,6 +83,7 @@ public class DefaultMQProducerService implements MsgProducerService{
...
@@ -81,6 +83,7 @@ public class DefaultMQProducerService implements MsgProducerService{
@Override
@Override
public
void
sendResultsMsg
(
ResultsMQMsg
resultsMQMsg
)
throws
InterruptedException
,
RemotingException
,
MQClientException
,
MQBrokerException
{
public
void
sendResultsMsg
(
ResultsMQMsg
resultsMQMsg
)
throws
InterruptedException
,
RemotingException
,
MQClientException
,
MQBrokerException
{
String
msg
=
JSON
.
toJSONString
(
resultsMQMsg
);
String
msg
=
JSON
.
toJSONString
(
resultsMQMsg
);
log
.
trace
(
String
.
format
(
"sendResultsMsg:%1$s"
,
msg
));
dstRocketMQTemplate
.
asyncSendOrderly
(
resultsTopic
+
":default"
,
msg
,
DigestUtils
.
md5DigestAsHex
(
msg
.
getBytes
()),
new
SendCallback
(){
dstRocketMQTemplate
.
asyncSendOrderly
(
resultsTopic
+
":default"
,
msg
,
DigestUtils
.
md5DigestAsHex
(
msg
.
getBytes
()),
new
SendCallback
(){
@Override
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
public
void
onSuccess
(
SendResult
sendResult
)
{
...
@@ -98,9 +101,9 @@ public class DefaultMQProducerService implements MsgProducerService{
...
@@ -98,9 +101,9 @@ public class DefaultMQProducerService implements MsgProducerService{
@Override
@Override
public
void
sendRuleResultsMsg
(
String
topic
,
String
tags
,
List
<
ExecResult
>
listExecResultMsg
){
public
void
sendRuleResultsMsg
(
String
topic
,
String
tags
,
List
<
ExecResult
>
listExecResultMsg
){
try
{
try
{
String
msg
=
JSON
.
toJSONString
(
listExecResultMsg
);
String
msg
=
JSON
.
toJSONString
(
listExecResultMsg
);
log
.
trace
(
String
.
format
(
"sendRuleResultsMsg:%1$s"
,
msg
));
dstRocketMQTemplate
.
asyncSendOrderly
(
topic
+
":"
+
tags
,
msg
,
DigestUtils
.
md5DigestAsHex
(
msg
.
getBytes
()),
new
SendCallback
(){
dstRocketMQTemplate
.
asyncSendOrderly
(
topic
+
":"
+
tags
,
msg
,
DigestUtils
.
md5DigestAsHex
(
msg
.
getBytes
()),
new
SendCallback
(){
@Override
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
public
void
onSuccess
(
SendResult
sendResult
)
{
...
@@ -113,7 +116,6 @@ public class DefaultMQProducerService implements MsgProducerService{
...
@@ -113,7 +116,6 @@ public class DefaultMQProducerService implements MsgProducerService{
}
}
});
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
"规则结果MQ主题:topic: {},tags: {},消息发送异常MQClientException: {}:"
,
topic
,
tags
,
e
);
log
.
error
(
"规则结果MQ主题:topic: {},tags: {},消息发送异常MQClientException: {}:"
,
topic
,
tags
,
e
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录