c#


Can I iterate through queues using the RabbitMQ .NET Client?


I'd like a way to iterate through existing queues on a rabbit server's virtual host, and output the number of messages in the queues, without hardcoding the queue names into my C# code.
Here's an example of getting the number of messages in a queue by hardcoding the queue value, using the RabbitMQ .NET Client:
using System;
using RabbitMQ.Client;
namespace RabbitMonitor
{
class Program
{
static void Main(string[] args)
{
var factory = new ConnectionFactory()
{
HostName = "<HostName>",
UserName = "<UserName>",
Password = "<Password>",
VirtualHost = "<VirtualHost>",
Port = 5672
};
var queueNameMessageCount = 0;
using (var connection = factory.CreateConnection())
using (var channel = connection.CreateModel())
{
queueNameMessageCount = channel.MessageCount("<QueueName>");
}
}
}
}
Is there a way I can get a collection of queues / queue names that are on a given virtual host, using the RabbitMQ .NET Client?
Related: is there a way for be to get a collection of virtual hosts/virtual host names on a server, using the RabbitMQ .NET Client?

Related Links

MS Bot builder IForm Invalid Type Exception:Has xxx Expect yyy
Table.compute() C# MIN, MAX and AVG
Post Build Event: Build Class Library and Copy Bin Folder Contents
Loading a Large Form in MVC
Encrypt/Decrypt String for Functions [duplicate]
How to set a different language to Bot Framework in Facebook Channel?
SQL display table in vertical
how to converter unreadable block of code in a class
Practical examples of when to use a ListPool or any pool of collections
I want to take array of 30 and use 3 threads that will sum the 30 values.Each thread adds in groups of 10
Send data from ASP.NET MVC to desktop application
What is the APEv1 tag identifier?
ServiceStack Client Put request and query parameters
using cookies for session mvc
Create shortcut to Content Files in File System's Setup Project
Submit selected checkboxes only for multiple objects to an MVC controller

Categories

HOME
airflow
joomla
teradata
gap-system
aggregate-functions
opacity
country-codes
python-3.4
ephesoft
token
soap-client
google-my-business-api
wowza
fetch
vichuploaderbundle
http-status-codes
tracking
mbed
saucelabs
eclipse-orion
box2d
url-parameters
fibonacci
pushbullet
waterfall
chartist.js
jira-zephyr
suitescript
datanucleus
inspec
multiple-inheritance
libxml2
setup-project
csproj
spring-data-gemfire
jboss-arquillian
overflow
jmsserializerbundle
mplab
directions
openvms
apache-falcon
angularjs-resource
incapsula
certbot
var
armadillo
lfe
tapply
delphi-xe
electron-packager
web-technologies
vpython
head
taleo
amazon-fire-tv
qtwebkit
stream-socket-client
nao-robot
history
sp
senti-wordnet
catalyst
vertex-shader
blackberry-webworks
cosign-api
change-password
database-administration
bbedit
apache2-module
jts
bootstrap-tabs
xml-simple
pdcurses
web-standards
teamwork
stderr
avd
frisby.js
fscanf
rails-migrations
episerver-7
banana-pi
opencobol
slimscroll
class-library
kuka-krl
android-jack-and-jill
sygic
jython-2.5
wpd
big-endian
nsscrollview
django-admin-tools
django-1.4
advanceddatagrid
stl-algorithm
inserthtml
xpolog
jquery-click-event
xhtmlrenderer
nscharacterset
activescaffold
uccapi
jgrowl
paperless

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App