Enterprise Integration Patterns
Conversation Patterns
HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT
Conversation Patterns
IntermediariesConversation Patterns » Intermediaries

While many conversations involve direct communication between two parties, some conversations inherently involve multiple parties. Several patterns related to Discovery or Starting a Conversation, such as Consult Directory or Acquire Token First, involve a third party that helps two participants communicate. In most cacses, though, this third party steps aside once the remaining participants are ready to communicate with each other. In contrast, this chapter presents conversation patterns, in which in Intermediary sits inside the message stream being exchanged between participants. Lastly, some multi-party conversations consist of many participants communicating directly with each other without the involvement of an intermediary or a coordinator.

Correspondingly, one can differentiate such multi-party conversations into the following categories:


Types of Multi-Party Conversations

Some multi-party conversations assume a fixed number of participants while others allow any number of participants. Some multi-party conversations even allow participants to join or leave the conversation "in flight", i.e. in the middle of the conversation.

Use Cases

Intermediaries are common in real life as well as in system design because they support a number of wide-spread use cases:

This chapter introduces the following intermediary patterns:

PatternDescription
ProxyForwards messages them to other participants.
RelayAllows two participants who can only make outbound requests to engage in a two-way conversation.
Scatter-GatherPropagates a request to multiple providers and aggregates the responses.