Acknowledgments (acks) RabbitMQ ਨੂੰ ਦੱਸਦਾ ਹੈ ਕਿ ਇੱਕ ਸੁਨੇਹਾ ਸਫਲਤਾ ਨਾਲ ਪ੍ਰਸੰਸਕਿਤ ਹੋ ਗਿਆ ਹੈ, ਇਸ ਲਈ ਇਸ ਨੂੰ ਕਤਾਰ ਤੋਂ ਹਟਾਇਆ ਜਾ ਸਕਦਾ ਹੈ। ਇਹ ਭਰੋਸੇਮੰਦ ਡਿਲੀਵਰੀ ਲਈ ਜ਼ਰੂਰੀ ਹਨ — ਯਕੀਨੀ ਬਣਾਉਂਦੇ ਹਨ ਕਿ ਜੇ ਕੋਈ consumer ਫੇਲ ਹੋ ਜਾਵੇ ਤਾ ਸੁਨੇਹਾ ਗੁਆ ਨਾ ਜਾਵੇ।
Acknowledgments ਕਿਵੇਂ ਕੰਮ ਕਰਦਾ ਹੈ
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)
