Request/reply (RPC) RabbitMQ ఎక్కడ సమకాలీన-శైలి request-response సంభాషణను సందేశ ఆధారితంగా ప్రారంభించడం — ఒక క్లায়েంట్ request పంపుతుంది మరియ reply queue ద్వారా response అందుకుంటుంది, responses లను requests కు సరిపోల్చడానికి correlation ID ను ఉపయోగించడం. ఇది service-to-service calls కోసం ఉపయోగకరమైన నమూనా.
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
