Publisher confirms ఒక యంత్రక్రియ ఇక్కడ 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 ఎలా పనిచేస్తాయి
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
