Publisher confirms एक मेकानिजम हो जहाँ RabbitMQ ले प्रोड्यूसरलाई स्वीकार गर्छ कि यसले संदेश प्राप्त गरेको छ (र persist गरेको छ) — यो सुनिश्चित गरेर कि संदेशहरू प्रकाशन पक्षमा हराएका छैनन्। तिनीहरू consumer acknowledgments को प्रोड्यूसर-साइड समकक्ष हुन्।
समस्या: के संदेश broker मा पुग्यो?
When a producer publishes a message, by default it doesn't KNOW if RabbitMQ received it:
→ network failure, broker issue → the message could be LOST without the producer knowing
→ for reliability, the producer needs CONFIRMATION that the message was accepted
→ publisher confirms address the PUBLISHING side of reliability
Publisher confirms कसरी काम गर्छन्
PUBLISHER CONFIRMS → the broker sends an ACK back to the producer for each message:
→ enable confirm mode on the channel
→ the broker ACKs a message once it has taken responsibility (received it; for persistent
messages on durable queues → once persisted to disk)
→ NACK → the broker couldn't handle the message (the producer can retry)
→ the producer KNOWS each message was accepted (or not) → no silent loss
