Publisher confirms হল একটি মেকানিজম যেখানে RabbitMQ প্রোডিউসারকে স্বীকার করে যে এটি একটি বার্তা গ্রহণ করেছে (এবং সংরক্ষণ করেছে) — নিশ্চিত করে যে বার্তা প্রকাশনা দিকে হারিয়ে যায় না। এগুলি কনজিউমার acknowledgments এর প্রোডিউসার-সাইড সমতুল্য।
সমস্যা: বার্তা ব্রোকারে পৌঁছেছে কি?
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
