node.js - AMQP - How many consumers on a queue? -


using amqp module node js , rabbitmq, there way tell how many subscribers there on queue?

we have multiple queues on default exchange multiple regions. when 1 region down, instead of routing messages queue, we'll instead route next-best amqp queue (region) actively listening.

is there way count number of subscribers on queue?

we have heartbeat set server should able track accurately.

thanks!

i ended figuring out piece of gold:

var conn = amqp.createconnection({ url: process.env.amqp, heartbeat: 60 });  conn.queue('queue-name').on('queuedeclareok', function(args) {   console.log('total consumers: ' + args.consumercount); } 

works :)


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -