![](/img/trans.png)
[英]How to configure an exchange for messages that raise exceptions in consumers with MassTransit for RabbitMQ in order to reuse them later on?
[英]Count of consumers in RabbitMQ (with exchange)
如果我在RabbitMQ中不使用交換功能,則可以獲得以下用戶數:
channel.QueueDeclare(queue: "Sellers",
durable: false,
exclusive: false,
autoDelete: false,
arguments: null);
int sellersCount = channel.ConsumerCount("Sellers");
如何通過交易所檢測消費者人數:
channel.ExchangeDeclare(exchange: "Shop",
type: "direct");
channel.BasicPublish(exchange: "Shop",
routingKey: "Sellers",
basicProperties: null,
body: body1);
channel.BasicPublish(exchange: "Shop",
routingKey: "Clients",
basicProperties: null,
body: body2);
int sellersCount = ???
int clientsCount = ???
為了詳細闡述Evk的評論 ,這里是RabbitMQ管理HTTP API文檔 。 嘗試GET /api/exchanges/vhost/name/bindings/source
:
以給定交換為源的所有綁定的列表。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.