In request/reply interaction, a client sends a request and waits for the service to respond. It suits query-style operations and commands that need immediate confirmation; Remote Procedure Invocation (RPI) commonly supports this pattern. section 8.2.1
Choose this interaction with its operational trade-offs in mind:
- Direct communication avoids an intermediate message broker, simplifying deployment, operation, and debugging, and can reduce latency. section 8.2.1
- The client and service must be available and responsive together; failures or high latency can propagate. Resiliency patterns can mitigate these risks. section 8.2.1
- Request/reply does not naturally support other interaction styles, which may require a message broker or event streaming platform. section 8.2.1
For messaging-based APIs, an AsyncAPI receive operation can specify reply messages, allowing request/reply communication to be modeled. section 8.3.5
