0

I have a bit of code where I want to get the current message count from RabbitMQ from my Meteor App. Running the code in Node console gives the callback parameters correctly, but the same code in Meteor only gives the first parameter.

rabbitMQ = AMQP.createConnection({ host: '127.0.0.1' });

rabbitMQ.addListener('ready', function(){
  console.log('Connecting to the channel...');
});

rabbitMQ.addListener('ready', function(){

   rabbitMQ.queue('foo', {durable:true, autoDelete:false}, function (queue, messages, consumers) {
     console.log('Queue ' + queue.name + ' is open with ' + messages + ' messages');
   });

});

In Node Prints:

Connecting to the channel...
Queue foo is open with 3 messages

In Meteor Prints:

Connecting to the channel...
Queue foo is open with undefined messages

Any ideas on why only the first (queue) parameter comes through when running in Meteor? I'm a Meteor noob, so maybe it's a Fibers issue?

DataRiot
  • 476
  • 3
  • 8

1 Answers1

0

I decided that keeping track in Mongo with state changes was easier than debugging this problem.

DataRiot
  • 476
  • 3
  • 8