I have been playing around with RabbitMQ with apache + php and wanted to see how it compared to Node.JS in performance.
Using the latest node.js (0.4.12) and amqp module (npm install amqp), i get a unknown exception connecting which it seems like it is the frame size causing error (line 181 in amqp.js), removing the error from the code just throws another related to allocating too large of an array size.
the RabbitMQ server is is just a "apt-get install rabbitmq-server" with default configuration. This works in PHP just fine.
Starting ... AMQP URL: amqp://localhost
events.js:47
throw new Error("Uncaught, unspecified 'error' event.");
^
Error: Uncaught, unspecified 'error' event.
at Connection.emit (events.js:47:15)
at AMQPParser.onError (/nodeJS_stuff/node_modules/amqp/amqp.js:839:12)
at AMQPParser.throwError (/nodeJS_stuff/node_modules/amqp/amqp.js:145:25)
at AMQPParser.execute (/nodeJS_stuff/node_modules/amqp/amqp.js:181:18)
at Connection.<anonymous> (/nodeJS_stuff/node_modules/amqp/amqp.js:851:12)
at Connection.emit (events.js:64:17)
at Connection._onReadable (net.js:672:14)
at IOWatcher.onReadable [as callback] (net.js:177:10)
Any one ever run into this? i have tried a couple examples and i always get this. i am running thi开发者_Python百科s on EC2 as well, if that helps any.
I just saw this problem today. It seemed to me like a mismatch between the versions of rabbitmq and amqp. I was testing two versions of node-amqp (0.0.2 and 0.1.0) and rabbitmq (1.7.2 and 2.3.1). I found out that node-amqp 0.0.2 works with both versions of rabbitmq, but the newer node-amqp (0.1.0, actually as of version 0.0.6) doesn't work with the older rabbitmq. So try rolling back your node-amqp to an older version and see if it works.
It is definitely a version mismatch between amqp and the installed version of RabbitMQ. The problem is most probably due to rabbitmq-server being too old. I had the exactly same problem on my Debian machine and the RabbitMQ installation guide pointed me to the right direction.
Uninstall your current version of rabbitmq-server and download the most recent one from the RabbitMQ website.
精彩评论