[英]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.