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
53636947
Commit
53636947
authored
Jun 22, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并空行BUG
parent
dbd13e20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
MqConfigurable.java
...src/main/java/com/yanzuoguang/mq/base/MqConfigurable.java
+3
-5
No files found.
yzg-util-mq/src/main/java/com/yanzuoguang/mq/base/MqConfigurable.java
View file @
53636947
...
@@ -5,11 +5,8 @@ import com.yanzuoguang.mq.vo.MessageVo;
...
@@ -5,11 +5,8 @@ import com.yanzuoguang.mq.vo.MessageVo;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.log.Log
;
import
com.yanzuoguang.util.log.Log
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.core.MessageListener
;
import
org.springframework.amqp.rabbit.connection.CachingConnectionFactory
;
import
org.springframework.amqp.rabbit.connection.CachingConnectionFactory
;
import
org.springframework.amqp.rabbit.connection.ConnectionFactory
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer
;
import
org.springframework.amqp.rabbit.support.CorrelationData
;
import
org.springframework.amqp.rabbit.support.CorrelationData
;
import
org.springframework.beans.factory.annotation.Configurable
;
import
org.springframework.beans.factory.annotation.Configurable
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
...
@@ -20,6 +17,7 @@ import java.nio.charset.Charset;
...
@@ -20,6 +17,7 @@ import java.nio.charset.Charset;
/**
/**
* MQ队列相关配置信息
* MQ队列相关配置信息
*
* @author 颜佐光
* @author 颜佐光
*/
*/
@Configurable
@Configurable
...
@@ -67,10 +65,10 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem
...
@@ -67,10 +65,10 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem
String
toId
=
getId
(
correlationData
.
getId
());
String
toId
=
getId
(
correlationData
.
getId
());
// 不是临时数据
// 不是临时数据
if
(
toId
.
equals
(
correlationData
.
getId
()))
{
if
(
toId
.
equals
(
correlationData
.
getId
()))
{
messageService
.
onSuccess
(
getId
(
correlationData
.
getId
())
);
messageService
.
onSuccess
(
toId
);
}
}
}
else
if
(!
ack
)
{
}
else
if
(!
ack
)
{
System
.
out
.
println
(
"丢失消息:"
+
ack
);
System
.
out
.
println
(
"丢失消息:"
+
ack
+
" msg:"
+
cause
);
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
Log
.
error
(
MqConfigurable
.
class
,
ex
);
Log
.
error
(
MqConfigurable
.
class
,
ex
);
...
...
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