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.
2 parents 406ef10 + bdb2179 commit ccea946Copy full SHA for ccea946
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 msg = '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, new Buffer(msg));
12
+ console.log(" [x] Sent %s", msg);
13
});
14
setTimeout(function() { conn.close(); process.exit(0) }, 500);
15
0 commit comments