الإقرارات (acks) تخبر RabbitMQ بأن الرسالة تمت معالجتها بنجاح، لذا يمكن إزالتها من قائمة الانتظار. فهي ضرورية للغاية لـ التسليم الموثوق — التأكد من عدم فقدان الرسائل إذا فشل المستهلك.
كيفية عمل الإقرارات
When a consumer receives and processes a message, it ACKNOWLEDGES it:
→ ACK → "I've processed this message" → RabbitMQ removes it from the queue
→ if a consumer DIES before acking (crash, disconnect) → RabbitMQ REQUEUES the message
→ redelivered to another consumer (NOT lost)
→ acks ensure messages are processed reliably (not lost if a consumer fails)
