What is the difference between the channel prefetch count and consumer prefetch count?

https://stackoverflow.com/questions/43783714/what-is-the-difference-between-the-channel-prefetch-count-and-consumer-prefetch

 

A recent upgrade to RabbitMQ server sees a change in the prefetch count reported for a consumer in the admin panel.

What is the difference between the channel prefetch count and consumer prefetch count as seen below?

enter image description here

We are running a set-up where we have multiple threads consuming off of a single consumer/channel. We allow the thread count and prefetch count to be adjusted on the fly. What combination of parameters to the Model.BasicQos(prefetchLength, prefetchCount, global); call on the c# client should we be using?

rabbitmq

shareedit

asked May 4 '17 at 13:05

yenta

763618

add a comment

1 Answer

activeoldestvotes

4

 

Basically prefetch in both cases means (maximum allowed) number of unacknowledged messages, per channel or per consumer. Check out here under title Channel Prefetch Setting (QoS). Important to note in case of channel prefetch (I'll just quote from aforementioned link)

Once the number reaches the configured count, RabbitMQ will stop delivering more messages on the channel unless at least one of the outstanding ones is acknowledged.

so no more messages to any of the consumers on that channel!

Nice examples on what numbers mean what and what happens when both of the prefetch values are set can be found here, so really what you need for the values in your case is arbitrary but obviously depends on various factors like: frequency of publishing, size of messages, number of consumers etc.

In the screenshot it seems that your consumer prefetch is bigger than channel prefetch. Now I don't know what the web management ui is reporting nor how do rabbitmq or the c# library handle this, but I would say that based on what is written in the documentation that consumer prefetch count can only be less or equal to channel prefetch count (I mean of course when it's actually used in runtime, not at declaring).

shareedit

answered May 4 '17 at 17:57

cantSleepNow

5,67532036

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值