midwayjs / midway

🍔 A Node.js Serverless Framework for front-end/full-stack developers. Build the application for next decade. Works on AWS, Alibaba Cloud, Tencent Cloud and traditional VM/Container. Super easy integrate with React and Vue. 🌈
https://www.midwayjs.org/
MIT License
7.41k stars 575 forks source link

@midway/rabbitmq 多框架启动突然错误 #987

Open letheliu opened 3 years ago

letheliu commented 3 years ago

Node Version: 12.21.0 Egg Version: midwayjs 2.9.3 Plugin Name: @midway/rabbitmq Plugin Version: 2.9.3 Platform: Windows Mini Showcase Repository: @midway/rabbitmq 多框架启动错误 midway使用Eggjs作为上层框架与@midway/rabbitm多框架启动,使用bootstrap.js启动,如下:

const WebFramework = require('@midwayjs/web').Framework;
const RabbitmqFramework = require('@midwayjs/rabbitmq').Framework;

const web = new WebFramework().configure({
  port: 8000,
});

const { Bootstrap } = require('@midwayjs/bootstrap');
Bootstrap
  .load(web)
  .load(config => {
    console.log('======>加载Rabbitmq框架<=======');
    return new RabbitmqFramework().configure(config.rabbitmq);
  })
  .run();

之前一直是好的,添加SocketIO后由于功能调整,又删除了SocketIO,恢复成现在的bootstrap.js。导致单独启动Web成功,一添加rabbitmq启动web就无法启动。显示如下:

2021-04-13 15:46:22,103 INFO 12140 [egg:core] dump config after load, 31ms
2021-04-13 15:46:22,116 INFO 12140 [midway:rabbitmq] [egg:core] dump config after ready, 6ms
/ Midway Starting2021-04-13 15:46:22,447 INFO 12140 [midway:rabbitmq] [egg-multipart] file mode enable
2021-04-13 15:46:22,447 INFO 12140 [midway:rabbitmq] [egg-multipart] will save temporary files to "C:\\Users\\admin\\AppData\\Local\\Temp\\egg-multipart-tmp\\imms", cleanup job cron: "0 30 4 * * *"
\ Midway Starting2021-04-13 15:46:22,624 INFO 12140 [midway:bootstrap] current app started
czy88840616 commented 3 years ago

似乎,没看到错误?

letheliu commented 3 years ago

是的,没有错误,但Web框架没有启动

czy88840616 commented 3 years ago

同步一下,我在编写 web + rabbitMQ 的脚手架,也发现类似问题,还在排查中。

wade-yifeng commented 3 years ago

同步一下,我在编写 web + rabbitMQ 的脚手架,也发现类似问题,还在排查中。

请问是否有进展,项目上有egg web + rabbitMQ的多框架启动需求

czy88840616 commented 3 years ago

调整有在 rfc 上透出 https://www.yuque.com/midwayjs/rfcs/ofimdd#aJ91s