8000 Minor change · syk-coder/rabbitmq-tutorials@bdb2179 · GitHub
[go: up one dir, main page]

Skip to content

Commit bdb2179

Browse files
Francisco OrtizFrancisco Ortiz
Francisco Ortiz
authored and
Francisco Ortiz
committed
Minor change
1 parent c544f23 commit bdb2179

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascript-nodejs/src/send.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ var amqp = require('amqplib/callback_api');
55
amqp.connect('amqp://localhost', function(err, conn) {
66
conn.createChannel(function(err, ch) {
77
var q = 'hello';
8-
var buffer = new Buffer('Hello World!');
8+
var msg = 'Hello World!';
99

1010
ch.assertQueue(q, {durable: false});
11-
ch.sendToQueue(q, buffer);
12-
console.log(" [x] Sent %s", buffer.toString());
11+
ch.sendToQueue(q, new Buffer(msg));
12+
console.log(" [x] Sent %s", msg);
1313
});
1414
setTimeout(function() { conn.close(); process.exit(0) }, 500);
1515
});

0 commit comments

Comments
 (0)
0