8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 406ef10 commit c544f23Copy full SHA for c544f23
javascript-nodejs/src/send.js
@@ -5,10 +5,11 @@ var amqp = require('amqplib/callback_api');
5
amqp.connect('amqp://localhost', function(err, conn) {
6
conn.createChannel(function(err, ch) {
7
var q = 'hello';
8
+ var buffer = new Buffer('Hello World!');
9
10
ch.assertQueue(q, {durable: false});
- ch.sendToQueue(q, new Buffer('Hello World!'));
11
- console.log(" [x] Sent 'Hello World!'");
+ ch.sendToQueue(q, buffer);
12
+ console.log(" [x] Sent %s", buffer.toString());
13
});
14
setTimeout(function() { conn.close(); process.exit(0) }, 500);
15
0 commit comments