|
@@ -32,9 +32,9 @@ public class MessageProducerTemplate { |
|
@@ -32,9 +32,9 @@ public class MessageProducerTemplate { |
32
|
|
32
|
|
33
|
private AmqpTemplate amqpTemplate;
|
33
|
private AmqpTemplate amqpTemplate;
|
34
|
|
34
|
|
35
|
- private final String TOPIC_EXCHAGE = "amq.topic";
|
35
|
+// private final String TOPIC_EXCHAGE = "amq.topic";
|
36
|
|
36
|
|
37
|
-// private final String FEDERATION_TOPIC_EXCHANGE = "yoho.federation.topic";
|
37
|
+ private final String FEDERATION_TOPIC_EXCHANGE = "yoho.federation.topic";
|
38
|
|
38
|
|
39
|
|
39
|
|
40
|
|
40
|
|
|
@@ -112,11 +112,11 @@ public class MessageProducerTemplate { |
|
@@ -112,11 +112,11 @@ public class MessageProducerTemplate { |
112
|
byte[] body = JSON.toJSONString(object).getBytes(Charsets.toCharset("UTF-8"));
|
112
|
byte[] body = JSON.toJSONString(object).getBytes(Charsets.toCharset("UTF-8"));
|
113
|
Message amqpMsg = new Message(body, properties);
|
113
|
Message amqpMsg = new Message(body, properties);
|
114
|
if (asyncEnable) {
|
114
|
if (asyncEnable) {
|
115
|
- asycnSend(TOPIC_EXCHAGE, topic, amqpMsg);
|
115
|
+ asycnSend(FEDERATION_TOPIC_EXCHANGE, topic, amqpMsg);
|
116
|
} else {
|
116
|
} else {
|
117
|
- this.amqpTemplate.send(TOPIC_EXCHAGE, topic, amqpMsg);
|
117
|
+ this.amqpTemplate.send(FEDERATION_TOPIC_EXCHANGE, topic, amqpMsg);
|
118
|
}
|
118
|
}
|
119
|
- logger.debug("send mq message success. exchange:{}, topic:{}, message:{}", TOPIC_EXCHAGE, topic, object);
|
119
|
+ logger.debug("send mq message success. exchange:{}, topic:{}, message:{}", FEDERATION_TOPIC_EXCHANGE, topic, object);
|
120
|
}
|
120
|
}
|
121
|
|
121
|
|
122
|
private void asycnSend(String topicExchange, String topic, Message amqpMsg) {
|
122
|
private void asycnSend(String topicExchange, String topic, Message amqpMsg) {
|