'use strict'; class AppBootHook { constructor(app) { this.app = app; } async didReady() { // 应用已经启动完毕 const ctx = await this.app.createAnonymousContext(); // 企业入驻申请消息接收事件 await ctx.service.rabbitmq.receiveQueueMsg('public_chat'); } async serverDidReady() { // 应用已经启动完毕 } } module.exports = AppBootHook; // module.exports = app => { // app.messenger.on('mq_action', data => { // console.log('------------------------------->app-start'); // // 应用已经启动完毕 // const ctx = app.createAnonymousContext(); // // 企业入驻申请消息接收事件 // ctx.service.rabbitmq.receiveQueueMsg('stu_import'); // }); // };