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

前端 未结 2 1387
夕颜
夕颜 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 08:54

    To answer this specifically for spring-amqp.

    prefetchCount=10 means the broker allows up to 10 unacked message for each consumer; it does not affect the number of threads.

    Use concurrentConsumers to create multiple consumers - which will have one thread each.

    auto ack means the broker doesn't require acks (so you can lose messages). Spring AMQP also blocks deliveries (to prefetch count) if the listener can't keep up.

提交回复
热议问题