Prefetch (QoS) اس بات کو محدود کرتا ہے کہ ایک صارف ایک وقت میں کتنے غیر تسلیم شدہ پیغامات رکھ سکتا ہے — کام کی تقسیم کو کنٹرول کرتے ہوئے اور ایک صارف کو مغلوب ہونے سے روکتے ہوئے جبکہ دوسرے بیکار ہوں۔ یہ منصفانہ، موثر پیغام کی کارروائی کے لیے اہم ہے۔
Prefetch کیا کرتا ہے
PREFETCH (QoS - prefetch count) → limits the number of UNACKNOWLEDGED messages a consumer
can have at once:
→ without it → RabbitMQ may dispatch many messages to one consumer (it grabs a batch)
→ with prefetch=N → a consumer gets at most N unacked messages at a time (must ack to get more)
→ controls how messages are distributed and how much a consumer buffers
