当先锋百科网

首页 1 2 3 4 5 6 7
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);
}