Authored by tanling

federation的方式 升级版本

@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <artifactId>yoho-message-sdk</artifactId> 13 <artifactId>yoho-message-sdk</artifactId>
14 <packaging>jar</packaging> 14 <packaging>jar</packaging>
15 <name>yoho-message-sdk</name> 15 <name>yoho-message-sdk</name>
16 - <version>1.1.0-SNAPSHOT</version> 16 + <version>1.1.1-SNAPSHOT</version>
17 17
18 <dependencies> 18 <dependencies>
19 <dependency> 19 <dependency>
@@ -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) {