Prefetch (QoS) limita cuántos mensajes no reconocidos puede mantener un consumidor a la vez — controlando la distribución de trabajo y evitando que un consumidor sea abrumado mientras otros están inactivos. Es importante para un procesamiento de mensajes justo y eficiente.
Qué hace 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
