title: Rabbit mq prefetch undestanding
body: <p>I understand below</p>
  <p><em>prefetch simply controls how many messsages the broker allows to be outstanding at the consumer at a time. When set to 1, this means the broker will send 1 message, wait for the ack, then send the next.</em></p>
  <p>but questions regarding following scenarios:</p>
  <ol>
  <li><p>Lets say prefetch is 200, we have 2 consumers idle. Broker got 150 messages, I think broker will pick one random and will send all 150 messages? I think yes it wont do sharing between consumers.</p>
  </li>
  <li><p>Lets say one consumer is having 100 messages in unack and one is idle and prefetch again is 200. Now we got 50 more messages, again I think broker will give those 50 to either one randomly?  Or it will not give to consumer who already have 100 messages that not acked yet</p>
  </li>
  <li><p>If prefetch is 200, one consumer got 200, will listener block that thread (spring rabbitmq listner method) to send ack until all 200 processed ? I think it will not send ack one by one and will wait until all prefetched messages processed. In other words if prefetch is 200 and if broker delivers 200 messages, when broker will start getting ack?</p>
  </li>
  </ol>