Authored by unknown

Merge branch 'redis_mq整改' into test6.3

... ... @@ -82,6 +82,10 @@
<groupId>com.yoho.core</groupId>
<artifactId>yoho-core-redis-cluster</artifactId>
</dependency>
<dependency>
<groupId>com.yoho.core</groupId>
<artifactId>yoho-core-rabbitmq</artifactId>
</dependency>
<!-- <dependency>
... ...
... ... @@ -71,6 +71,10 @@
<artifactId>union-service-model</artifactId>
<version>1.2.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yoho.core</groupId>
<artifactId>yoho-core-rabbitmq</artifactId>
</dependency>
</dependencies>
<build>
... ...
... ... @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yoho.core.common.utils.MD5;
import com.yoho.core.rabbitmq.YhConsumer;
import com.yoho.unions.dal.IArticleBlockDao;
import com.yoho.unions.dal.IArticleDAO;
import com.yoho.unions.dal.model.Article;
... ... @@ -27,7 +28,7 @@ import java.util.*;
* Created by lenovo on 2017/6/15.
*/
@Component
public class ArticlePushConsumer implements CommonMessageConsumer {
public class ArticlePushConsumer implements YhConsumer {
private Logger logger = LoggerFactory.getLogger(ArticlePushConsumer.class);
... ... @@ -53,10 +54,10 @@ public class ArticlePushConsumer implements CommonMessageConsumer {
@Autowired
private IArticleBlockDao articleBlockDao;
@Override
public String getMessageTopic() {
return ARTICLE_PUSH_TOPIC;
}
// @Override
// public String getMessageTopic() {
// return ARTICLE_PUSH_TOPIC;
// }
@Override
public void handleMessage(Object message) {
... ...
... ... @@ -3,6 +3,7 @@ package com.yoho.unions.server.mqconsumer;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yoho.core.message.YhMessageConsumer;
import com.yoho.core.rabbitmq.YhConsumer;
import com.yoho.unions.common.utils.DateUtil;
import com.yoho.unions.dal.IUserOrdersDAO;
import com.yoho.unions.dal.IUserOrdersRelationDAO;
... ... @@ -23,11 +24,11 @@ import java.util.Map;
* Created by zhouxiang on 2016/11/4.
*/
@Component
public class OrderPushConsumer implements CommonMessageConsumer {
public class OrderPushConsumer implements YhConsumer {
private Logger logger = LoggerFactory.getLogger(OrderPushConsumer.class);
private final static String ORDER_PUSH_TOPIC = "union.order_push";
// private final static String ORDER_PUSH_TOPIC = "union.order_push";
@Autowired
IUserOrdersDAO userOrdersDAO;
... ... @@ -35,10 +36,10 @@ public class OrderPushConsumer implements CommonMessageConsumer {
@Autowired
IUserOrdersRelationDAO userOrdersRelationDAO;
@Override
public String getMessageTopic() {
return ORDER_PUSH_TOPIC;
}
// @Override
// public String getMessageTopic() {
// return ORDER_PUSH_TOPIC;
// }
@Override
public void handleMessage(Object o) {
... ...
consumer:
- address: 192.168.102.45:5672
consumers:
- class: com.yoho.unions.server.mqconsumer.ArticlePushConsumer
topic: guang.article_push
- class: com.yoho.unions.server.mqconsumer.OrderPushConsumer
topic: union.order_push
... ...
consumer:
- address: ${rabbit_common_aws}
username: ${rabbit_common_aws_user}
password: ${rabbit_common_aws_password}
- address: ${rabbit_common_qq}
username: ${rabbit_common_qq_user}
password: ${rabbit_common_qq_password}
consumers:
- class: com.yoho.unions.server.mqconsumer.ArticlePushConsumer
topic: guang.article_push
- class: com.yoho.unions.server.mqconsumer.OrderPushConsumer
topic: union.order_push
... ...