ted
ted

Reputation: 5329

Can rabbitmq suggest prefetch/QoS value based on its metrics?

RabbitMQ allows QoS.

https://www.rabbitmq.com/consumer-prefetch.html

The question is more about the optimal values. Can RabbitMQ propose optimal on its metrics value?

Upvotes: 2

Views: 164

Answers (1)

Jspdown
Jspdown

Reputation: 434

No, it doesn't. However, you can estimate it based on your use case.

I suggest you read this blog post from CloudAMQP: https://www.cloudamqp.com/blog/2017-12-29-part1-rabbitmq-best-practice.html

This is really well written and provides a lot of useful advice. In their section "How to set correct prefetch value?" they describe three cases:

  • Single/few consumers and short processing time: prefetch ~= round_trip / processing_time
  • Many consumers and short processing time: prefetch < round_trip / processing_time
  • Many consumers and long processing time: prefetch set to 1

Upvotes: 4

Related Questions