构建一个nodejs应用程序,利用使用Node进程集群的多核系统,所有工作人员都在侦听端口3002.在侦听端口之上,我尝试定期为所有工作人员安排作业以接收消息来自Queue(例如:亚马逊SQS)。这导致在执行计划任务期间工人死亡。
我们可以使用工作人员进行调度和收听吗?
{"eid":"1440263352155-39077","description":"Polling for messages","level":"debug","message":"","timestamp":"2015-08-22T17:09:12.155Z"}
{"eid":"1440263359093-21470","description":"Received SQS response [object Object]","level":"debug","message":"","timestamp":"2015-08-22T17:09:19.093Z"}
{"eid":"1440263359111-30019","description":"Worker 873 died :(","level":"debug","message":"","timestamp":"2015-08-22T17:09:19.111Z"}