liveBook · Manning

Request-response pattern

Also called request-response model, request-response cycle, request-response protocol

A request-response pattern is a communication interaction in which one party sends a request and another returns a corresponding response.

How 5 Manning books explain it

Spring in Action, Sixth Edition

A request-response model is a communication pattern in which one party sends a request and waits for a corresponding response.

How it is used
Introduces a familiar exchange pattern before comparing RSocket’s other communication models.
How deep it goes
Defines the one-request, one-response exchange and works through a Spring server and client without detailing protocol internals.
Examples
Uses a greeting controller and client, including a variable route and logged response.
What you can do after
Apply it via Spring’s RSocketRequester and a controller with @MessageMapping.

Read how Spring in Action, Sixth Edition explains request-response pattern →

Kafka for Architects

A request-response pattern is a communication pattern in which one service sends a request and another service returns a corresponding response.

How it is used
Frames direct service interaction as an alternative to event-driven and publish-subscribe communication.
How deep it goes
Explains correlation and failure hazards, but stops short of detailing recovery strategies beyond identifying implementation approaches.
Examples
Uses correlation headers, response topics, partitions, service instances, and failure-reassignment scenarios.
What you can do after
Apply it via Spring Kafka while accounting for correlation, response routing, and lost request context after consumer failure.

Read how Kafka for Architects explains request-response pattern →

ActiveMQ in Action

A messaging pattern in which a requester sends a message and receives a corresponding reply.

How it is used
Uses request/reply to exchange messages through a broker when a client needs a corresponding response.
How deep it goes
Walks through client setup and request properties, alongside an overview of worker reply handling.
Examples
Uses a client that sends ten requests, identifies them with UUIDs, and listens on a temporary queue.
What you can do after
Apply it via JMS and ActiveMQ to set up a request producer and a reply consumer.

Read how ActiveMQ in Action explains request-response pattern →

Microservices Patterns, Second Edition

An interaction style in which a client sends a request and waits for a timely response.

How it is used
Classifies one-to-one client-service interactions where clients expect timely replies, alongside asynchronous and one-to-many styles.
How deep it goes
Defines the client’s wait for a timely reply and contrasts nearby styles, without specifying implementation steps.
What you can do after
Evaluate interaction styles by reply timing and recognize that messaging does not eliminate blocking or runtime coupling.

Read how Microservices Patterns, Second Edition explains request-response pattern →

Spring Microservices in Action

A request-response pattern is a communication pattern in which a caller sends a request and waits for a response before continuing.

How it is used
Shows synchronous communication for retrieving organization data and invalidating a licensing service’s cache.
How deep it goes
Traces cache lookup, REST fallback, storage, and invalidation, then identifies coupling and brittleness.
Examples
Uses a licensing service that retrieves organization records from Redis or an organization service and invalidates cached data after updates.
What you can do after
Evaluate how synchronous callbacks can couple services and make cache invalidation brittle.

Read how Spring Microservices in Action explains request-response pattern →

Also covered in

What to know first

Related concepts

Questions about request-response pattern

What is request-response pattern?

A request-response pattern is a communication interaction in which one party sends a request and another returns a corresponding response.

Which Manning books explain request-response pattern?

Spring in Action, Sixth Edition, Kafka for Architects, ActiveMQ in Action, Microservices Patterns, Second Edition and Spring Microservices in Action.

What should I know before learning request-response pattern?

Manning books that teach request-response pattern usually introduce HTTP, messaging, microservice architecture and REST first.

What is the difference between request-response pattern and message-based protocol?

A request-response pattern is a communication interaction in which one party sends a request and another returns a corresponding response. A communication protocol in which participants exchange messages rather than relying on a request followed by a response.

What kinds of request-response pattern are there?

Kinds of request-response pattern include HTTP.

What is request-response pattern also called?

Request-response pattern is also called request-response model, request-response cycle or request-response protocol.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.