MessageQueueUtil.publish(MsgTopic.CUSTOMER_INFO_UPDATE,
JSON.toJSONString(reqCustomerInfo));//这个表示消息的发布工作
/**
* 监听客户信息同步消息
* @param message
* @param channel
*/
@IotasSubscribe(topic=MsgTopic.CUSTOMER_INFO_UPDATE)
public void processCustomerInfoUpdate(String message, String channel) {
CustomerSyncInfoBean customerSyncInfo= JSON.parseObject(message, CustomerSyncInfoBean.class);
logger.info("收到频道" + channel + " 的消息, = " + customerSyncInfo.toString());
InitService initService = (InitService)ApplicationUtil.getBean("initService");
// CustomerSyncRsp rsp = new CustomerSyncRsp();
initService.syncCustomerInfo(customerSyncInfo);
}
JSON.toJSONString(reqCustomerInfo));//这个表示消息的发布工作
/**
* 监听客户信息同步消息
* @param message
* @param channel
*/
@IotasSubscribe(topic=MsgTopic.CUSTOMER_INFO_UPDATE)
public void processCustomerInfoUpdate(String message, String channel) {
CustomerSyncInfoBean customerSyncInfo= JSON.parseObject(message, CustomerSyncInfoBean.class);
logger.info("收到频道" + channel + " 的消息, = " + customerSyncInfo.toString());
InitService initService = (InitService)ApplicationUtil.getBean("initService");
// CustomerSyncRsp rsp = new CustomerSyncRsp();
initService.syncCustomerInfo(customerSyncInfo);
}