[ Team LiB ] |
C.3 Messaging Integration Patterns
GoalTo allow a single handler to easily process messages from a variety of sources that have similar content but different formats. Participants
InteractionsSenders send messages to the content aggregator. The aggregator reads each message and creates a new message in a common format. The new message is sent on to a single handler.
GoalProvide a single point of receipt for messages associated with a particular use case, even if the use case will be handled by different backend systems depending on the content of the request (Figure C-3). Figure C-3. Content-based routingParticipants
InteractionsThe sender sends a message to the router. The router examines the message content and determines which handler should be used to process it. This check may be assisted by an external resource, such as a directory server. The router then dispatches the message to the appropriate handler.
GoalTo provide a centralized interface for asynchronously managing multiple systems and multiples nodes of single systems (Figure C-4). Figure C-4. Control bus spanning three applications with logging and control channelsParticipants
InteractionsThe applications being controlled share a single control bus channel to send event messages and receive control messages. Event messages are read off the channel by administrative clients, which include administration consoles and logging servers. The controlled applications monitor the control bus channel for command messages. NotesCommand messages on the channel can take two forms: global and targeted. All applications must be compatible with the command message format used on the bus. This compatibility allows an administrative application to send global commands as well as commands to individual applications. Event messages, likewise, must share a common format, allowing administrative and logging clients to easily process the information provided by each application.
GoalTo spread processing of a message across multiple consumers, allowing flexible workflow, distribution of processing, and easy reuse (Figure C-5). Figure C-5. Pipes and filters collaborationParticipants
InteractionsThe sender transmits a message to the first message handler in the processing chain. The first handler in the chain examines the message and performs whatever processing is required. It then forwards the message to another handler for further processing. Each handler is required to determine the appropriate next destination. NotesFor more on implementing flexible workflows, see the Service to Worker pattern. |
[ Team LiB ] |