Acknowledgment (ack) บอก RabbitMQ ว่าข้อความได้ถูกประมวลผลสำเร็จแล้ว เพื่อให้มันถูกลบออกจาก queue ได้ สิ่งนี้จำเป็นต่อ การส่งมอบที่เชื่อถือได้ — รับประกันว่าข้อความจะไม่สูญหายหาก consumer ล้มเหลว
acknowledgment ทำงานอย่างไร
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)
