MessageQueueUtil.publish(MsgTopic.CUSTOMER_INFO_UPDATE,
JSON.toJSONString(reqCustomerInfo));//这个表示消息的发布工作
@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));//这个表示消息的发布工作
@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);
}