rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
12.22k stars 3.91k forks source link

node.js tutorial patch #46

Closed imran-uk closed 9 years ago

imran-uk commented 9 years ago

Thanks for proviing node.js support!

To get the first 3 tutorials to work, I had to change a couple of files like this:

╭─imran at lenovo in ~ 
╰─○ colordiff rabbitmq-tutorials/javascript-nodejs/send.js carrot/send.js 
7c7
<     connection.publish('task_queue', 'Hello World!');

---
>     connection.publish('hello', 'Hello World!');
╭─imran at lenovo in ~ 
╰─○ colordiff rabbitmq-tutorials/javascript-nodejs/amqp-hacks.js carrot/amqp-hacks.js 
7c7,8
<     connection.queue('tmp-' + Math.random(), {exclusive: true}, function(){

---
>     connection.queue('task_queue', {exclusive: true}, function(){
>     //connection.queue('tmp-' + Math.random(), {exclusive: true}, function(){
michaelklishin commented 9 years ago

See rabbitmq-tutorials. I also highly recommend using amqp.lib which has its own tutorial port.

imran-uk commented 9 years ago

Hi Michael,

Sorry, I posted to the wrong repo. It was "https://github.com/rabbitmq/rabbitmq-tutorials" that I was referring to, specifically: rabbitmq-tutorials/javascript-nodejs

I'm following those alongside http://www.rabbitmq.com/getstarted.html