--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
r, ch) {
> ^
> TypeError: Cannot read property 'createChannel' of undefined
> (screen shot of the error attached)
>
> was wondering if anyone could help me out and tell me where am i
> going wrong ,
| var amqp = require('amqplib/callback_api'); |
|
|
| amqp.connect('amqp://localhost', function(err, conn) { |
| conn.createChannel(function(err, ch) { |
| var q = 'hello'; |
| var msg = 'Hello World!'; |
|
|
| ch.assertQueue(q, {durable: false}); |
| // Note: on Node 6 Buffer.from(msg) should be used |
| ch.sendToQueue(q, new Buffer(msg)); |
| console.log(" [x] Sent %s", msg); |
| }); |
| setTimeout(function() { conn.close(); process.exit(0) }, 500); |