પબ્લિશર કનફર્મ્સ એક મેકેનિઝમ છે જ્યાં RabbitMQ પ્રોડ્યુસરને સ્વીકાર કરે છે કે તેણે સંદેશ પ્રાપ્ત (અને સંગ્રહિત) કર્યો છે — જે સુનિશ્ચિત કરે છે કે સંદેશાઓ પ્રકાશન પક્ષે ગુમ થતા નથી. તે કનઝ્યુમર એક્નોલેજમેન્ટ્સનું પ્રોડ્યુસર-સાઇડ સમકક્ષ છે.
સમસ્યા: શું સંદેશ બ્રોકર સુધી પહોંચ્યો?
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 → 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
