amqplib: callback-api definition and tests added

This commit is contained in:
abreits
2015-10-14 15:09:10 +02:00
parent 93bcd768f0
commit 9e7d9453a1
+2 -2
View File
@@ -28,7 +28,7 @@ amqpcb.connect("amqp://localhost", (err, connection) => {
if(!err) {
connection.createChannel((err, channel) => {
if (!err) {
channel.assertQueue("myQueue", (err, ok) => {
channel.assertQueue("myQueue", {}, (err, ok) => {
if(!err) {
channel.sendToQueue("myQueue", new Buffer(msg));
}
@@ -42,7 +42,7 @@ amqpcb.connect("amqp://localhost", (err, connection) => {
if(!err) {
connection.createChannel((err, channel) => {
if (!err) {
channel.assertQueue("myQueue", (err, ok) => {
channel.assertQueue("myQueue", {}, (err, ok) => {
if(!err) {
channel.consume("myQueue", newMsg => console.log("New Message: " + newMsg.content.toString()));
}