What is the difference between prefetch count vs no ack in rabbitmq

前端 未结 2 1366
夕颜
夕颜 2021-01-14 08:43

I need to know what is the difference between prefetch count vs no ack in rabbitmq ?

Also What is the difference between following statements :-

if i set pr

2条回答
  •  有刺的猬
    2021-01-14 09:07

    Pre-fetch count: How many messages the consumer should read from queue and kept internally rather than picking one message at a time.

    No-Ack: Do not acknowledge back that the consumer is done consuming the message.

    Those both are used to fine tune your set-up

    To address your second part of the question: If you set prefetch count to 10, 10 consumers won't be created, but your single consumer will fetch 10 messages at a time.

    And if you create 10 consumers it will most likely create 10 threads (or processes). It all depends on how you configure it. Most likely you will be wanting to use a thread pool though

提交回复
热议问题