Request/reply (RPC) sobre RabbitMQ permite comunicación request-response de estilo síncrono usando mensajería — un cliente envía una solicitud y recibe una respuesta a través de una cola de respuesta, usando un correlation ID para emparejar respuestas con solicitudes. Es un patrón útil para llamadas entre servicios.
Cómo funciona RPC en RabbitMQ
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
