|
|
Master SOA Design Pattern Catalog
|
|
|
|

Service Callback (Karmarkar)

|

Home > Service Messaging Patterns > Service Callback
|
|
How can a service communicate asynchronously with its
consumers?
|
|
|
|
|

Problem

When a service needs to respond to a consumer request through
the issuance of multiple messages or when service message
processing requires a large amount of time, it is often not
possible to communicate synchronously.
|
|

Solution

A service can require that consumers communicate with it
asynchronously and provide a callback address to which the
service can send response messages.
|
|

Application

A callback address generation and message correlation
mechanism needs to be incorporated into the messaging
framework and the overall inventory architecture.
|
 |
 |
 |

Impacts

Asynchronous communication can introduce reliability
concerns and can further require that surrounding infrastructure
be upgraded to fully support the necessary callback correlation.
|
|
|
|
|
|


|
Service A sends a message containing the callback address and correlation information to Service B (1). While
Service B is processing the message, Service A is unblocked (2). Service B, at some later point in time, sends a
response containing the correlation information to the callback address to Service A (3). While Service B retains
this callback address, it can continue to issue subsequent response messages to Service A.

|
|

Related Patterns in This Catalog

Asynchronous Queuing (Little, Rischbeck, Simon),
Atomic Service Transaction (Erl),
Event-Driven Messaging (Little, Rischbeck, Simon),
File Gateway (Roy),
Message Metadata (Erl),
Reliable Messaging (Little, Rischbeck, Simon),
Service Agent (Erl)
|

|
|
|
This page contains excerpts from:

SOA Design Patterns by Thomas Erl

Foreword by Grady Booch

With contributions from David Chappell, Jason Hogg, Anish Karmarkar, Mark Little, David Orchard, Satadru Roy, Thomas Rischbeck, Arnaud Simon, Clemens Utschig, Dennis Wisnosky, and others.

(ISBN: 0136135161, Hardcover, Full-Color, 400+ Illustrations, 865 pages)

For more information about this book, visit www.soabooks.com.
|
|