Request/reply (RPC) RabbitMQ এর উপর সিঙ্ক্রোনাস-স্টাইল request-response যোগাযোগ সক্ষম করে মেসেজিং ব্যবহার করে — একটি ক্লায়েন্ট একটি request পাঠায় এবং একটি reply queue এর মাধ্যমে একটি response পায়, responses কে requests এর সাথে মেলাতে একটি correlation ID ব্যবহার করে। এটি সার্ভিস-টু-সার্ভিস কলগুলির জন্য একটি দরকারী প্যাটার্ন।
RabbitMQ তে RPC কিভাবে কাজ করে
RPC pattern over messaging:
1. CLIENT sends a REQUEST message, including:
→ a REPLY-TO queue (where the response should go)
→ a CORRELATION ID (unique ID to match the response to this request)
2. SERVER (consumer) processes the request and sends a RESPONSE to the reply-to queue,
including the same CORRELATION ID
3. CLIENT receives the response from its reply queue, matches it by CORRELATION ID →
pairs the response with the original request
→ request-response over async messaging
