"WCF Technology Insider" translation 15:1th Part _ 3rd Chapter _ Message Exchange Mode, topology and choreography: Message topology, message orchestration and summary of this chapter
Message topology
The message topology describes how messages are sent between one or more senders and recipients. A message topology can describe a simple application-application connection, but it can also describe complex applications-enterprise connections. In subsequent articles, the role of service-oriented applications will emerge. In a nutshell, these possible topologies are more and more complex than the components-oriented application systems can relate to.
At some level, a message topology is a combination of one or more message exchange modes (MEP). There may be countless topologies in fact, but there are 4 commonly accepted classifications: point-to-point, datagram point-to-point, transit, and Peer-to-peer. It is important to note that unlike the MEP, these different message topology names have not been widely accepted, so I'm a little presumptuous here. Again, we can increase or decrease the number of message topologies, but these 4 are enough for us to discuss this time.
Point to Point
The simplest and most widely used message topology, the point-to-point approach is an essential part of the message topology. In simple terms, a point-to-point topology refers to the exchange of messages between a sender and a recipient. As you can see in the previous article, this message exchange is implemented using datagrams, request/reply, or duplex MEP.
Forward-to-point only
I personally think that the datagram point to point is the most interesting topology, but it is also the most difficult to achieve. In essence, a forward-only point-to-point topology is a datagram chain sent to different participants. It is important to instruct this topology to be composed of only the datagram MEP. It is possible for the message to be returned to the participant, but the explicit tag return address in the message is better than the implicit description, just like the request/reply method. Typically, this topology relies on <From>, <ReplyTo>, <FaultTo>, <RelatesTo>, <MessageID>, and <To> Ws-addressing the message header block to implement.
Figure 3-4: Forward-only point-to-point message topology
Message forwarding
As the development community accepts messaging applications, it becomes increasingly important to forward messages between these messaging application systems. A similar demand emerged at a time when the Internet and E-commerce became popular. A typical example of this period is the load balancer in the service cluster. The load balancer forwards, among other things, the resources available on the request path. As the Times progressed, the load balancer became more intelligent, and the trend showed no sign of slowing down. I want to have the same change in the area of service-oriented application systems.
Typically, a message forwarding agent (broker, broker, translated here as a proxy) is a message participant that forwards a message to another endpoint. The message forwarding agent can determine when, where, and how messages are sent to other message participants based on processing rules. A message forwarding agent topology can be subdivided into distributed message forwarding agents, centralized message forwarding agents, and mixed message forwarding agents. This message forwarding agent topology is much like the different mail service topologies currently in use.
In addition, the well-known publish-subscribe topology conforms to the definition of the message forwarding topology. In the publish-subscribe architecture, participants subscribe to specific messages by registering their own publishers of interest. When a message of interest to a subscriber is sent to the publisher, the Publisher forwards the message to all Subscribers. In other words, the publisher is the message Relay Agent. In soap, the message broker is an intermediary, but it can tag the address directly. Figure 3-5 illustrates a basic message forwarding topology.
Figure 3-5: Message forwarding Topology