![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nodejs
那你就叫我鑫哥吧
三年码龄,嫌弃自己太渣。要通过写博客来提高自己
展开
-
Rabbit MQ amqplib error “No channels left to allocate”
今天在查看node.js服务日志的时候发现amqplib模块报错No channels left to allocate。是服务没有复用通道,创建了太多的channel导致该问题,通过调试找到报错的问题,在amqplib/lib/connection.js中freshChannel函数中报错。具体代码如下:// I use an array to keep track of the chann...原创 2019-09-23 20:25:07 · 2477 阅读 · 0 评论 -
node.js map 的用法
map 遍历数组每一个元素并调用回调,并返回一个包含所有结果的数组。函数声明如下: /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A fu...原创 2019-09-24 16:49:32 · 14248 阅读 · 0 评论