Merge pull request #92 from Fortiz2305/pull_req
Change buffer creation approach
This commit is contained in:
commit
ccea946ff5
@ -5,10 +5,11 @@ 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});
|
||||
ch.sendToQueue(q, new Buffer('Hello World!'));
|
||||
console.log(" [x] Sent 'Hello World!'");
|
||||
ch.sendToQueue(q, new Buffer(msg));
|
||||
console.log(" [x] Sent %s", msg);
|
||||
});
|
||||
setTimeout(function() { conn.close(); process.exit(0) }, 500);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user