--- url: "https://www.enterpriseintegrationpatterns.com/patterns/conversation/MultiIntro.html" titulek: "Intermediaries - Enterprise Integration Patterns 2" h1: "" popis: "Enterprise Integration Patterns" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-15 14:54:07" znaku: 3610 slov: 487 kodovani: "utf-8" sha256: "9734bbe7b4ad7600f5f422f6583c9a3ef09d778ac142c8b0284f56d0c08cbaed" --- | | Intermediaries[Conversation Patterns](index.html) » [Intermediaries](MultiIntro.html) | [Contents](toc.html)[⇐ Prev](QuickAck.html)[Next ⇒](Proxy.html) | | --- | --- | --- | While many conversations involve direct communication between two parties, some conversations inherently involve multiple parties. Several patterns related to [*Discovery*](DiscoveryIntro.html) or [*Starting a Conversation*](EstablishingIntro.html), such as [*Consult Directory*](ConsultDirectory.html) or [*Acquire Token First*](AcquireToken.html), 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: - **Peer-to-peer** conversations consists of multiple identical or similar participants that communicate directly with each other, e.g. [*Leader Election*](LeaderElection.html) . - **Intermediaries** acts as a connecting element between multiple participants. The message exchange between the participants runs through the intermediary. This chapter describes multiple such patterns. - **Coordinators** drive the conversation by taking a central role that interacts with other participants, e.g. a [*Coordinated Agreement*](CoordinatedAgreement.html) . - **Connectors** facilitate a direct conversation between other participants. They do not sit inside the mesage exchange between participants but play a special role in supporting the conversation, e.g. by helping participants discover each other ( [*Consult Directory*](ConsultDirectory.html) ). *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: - **Communication Restrictions** : some participants may not be allowed to hold open communications and thus are required to use *Intermediaries* . - **Control** : Use of intermediaries may be required for audit and control purposes. In many such cases, direct communication is restricted to enforce the usage of the intermediary. - **Convenience** : intermediaries allow participants to communicate with a single partner instead of multiple partners, some of which may even come and go or be unavailable. Intermediaries also reduce the need for [*Discovery*](DiscoveryIntro.html) as the initiator only needs to know the identity of the *Intermediary* . - **Value-add** : Real-life intermediaries may provide additional services beyond convenience, such as obtaining discounts from providers, covering legal risks, or selling items in smaller quantities, such as a retailer. This chapter introduces the following intermediary patterns: | **Pattern** | **Description** | | --- | --- | | **[*Proxy*](Proxy.html)** | Forwards messages them to other participants. | | **[*Relay*](Relay.html)** | Allows two participants who can only make outbound requests to engage in a two-way conversation. | | **[*Scatter-Gather*](Aggregator.html)** | Propagates a request to multiple providers and aggregates the responses. |