8000 Merge pull request #95 from Robinnnnn/patch-1 · rtoth89/rabbitmq-tutorials@faa1f86 · GitHub
[go: up one dir, main page]

Skip to content

Commit faa1f86

Browse files
Merge pull request rabbitmq#95 from Robinnnnn/patch-1
Use `Buffer.from` in place of `new Buffer`
2 parents 31fe04e + f71200b commit faa1f86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript-nodejs/src/send.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ amqp.connect('amqp://localhost', function(err, conn) {
88
var msg = 'Hello World!';
99

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

0 commit comments

Comments
 (0)
0