In this Lesson, the Following Topic is Discussed:
Show Integration Patterns.
Show Integration Patterns
The following Integration Patterns are included in the example package:
- Aggregator
- Composed Message Processor
- Content-Based Routing
- Content Enricher
- Content Filter
- Message Filter
- Recipient List
- Resequencer
- Scatter-Gather
- Splitter
- Quality of Service Exactly Once
The Integration Patterns in Detail:
- Aggregator
To process related individual messages in bulk, you can use an Aggregator pattern. This pattern involves collecting and storing individual messages until a complete set of related messages is received. The aggregated message is then sent to the intended receiver.
- Composed Message Processor
The Composed Message Processor pattern is useful when you must process a message that contains multiple elements, each requiring different processing. The pattern involves splitting the message into submessages, routing each submessage to a different destination, and then reaggregating the responses back into a single message.
- Content-Based Routing
Assuming you have an order process in which the inventory system handling the order depends on the shipping address, you can use content-based routing to direct the message to the appropriate recipient based on its content. In this exercise, we use a content-based router.
Read more here:
- Content Enricher
Suppose you must send an order to a supplier, but you don't have all the required information for the receiver system to process it. For example, the product items only have a category code, and the main category name is missing. In this case, you can use a Content Enricher pattern that reads data synchronously from an external system and appends the missing information to the original message before forwarding it to the receiver.
- Content Filter
Assuming you receive an order from a partner in a standardized format with many fields, but your backend system only needs a small fraction of them. You have two options to implement this scenario:
- Using a Filter step.
- Using Message Mapping.
Read more here:
- Message Filter
You can implement the Message Filter pattern to remove unwanted data from a channel. For example, if you must send product information to an inventory system, but the inventory system only handles a specific range of products based on product category, you can apply a Message Filter to discard any irrelevant data. The Message Filter is a subtype of the Message Router pattern, with only one receiver channel. It evaluates incoming messages and routes them to the receiver channel only if they meet the specified criteria; otherwise, they are discarded.
- Recipient List
Assuming that you want to find the best quote for an order by sending it to several suppliers, but not all suppliers are relevant for every product in the order. In this case, the suppliers that should receive the order are dynamically determined based on the specific products being ordered. To achieve this, you can use the Dynamic Router pattern, which sends a copy of the message to multiple receivers based on dynamically determined criteria. Unlike the content-based router, which forwards the original message to a single receiver, the dynamic router sends a copy of the message to multiple receivers.
Read more here:
- Resequencer
If you must rearrange messages that were received by Cloud Integration in an incorrect order, you can employ the Aggregator pattern. This pattern enables you to gather individual messages in batches that are sorted by sequence number. To transform the message batches back into separate messages, you can use the Splitter pattern and send the individual messages to the intended receiver.
- Scatter-Gather
The Scatter-Gather pattern allows you to send a message to multiple recipients and collect their replies. By broadcasting a message to multiple recipients, the pattern enables parallel processing of the message by all recipients. After receiving the responses, the pattern reaggregates them back into a single message.
- Splitter
The Splitter pattern can be used when a message contains multiple elements that require different processing. The pattern can break up the message into individual messages based on the number of elements. However, in the given exercise, the Splitter pattern is not used.
A distinction is made between the following use cases:
- Splitting a bulk order message into multiple orders.
- Splitting a single order with multiple items.
Read more here:
Quality of Service Exactly Once
You want to guarantee that a message is delivered and processed by the receiver exactly once. This requirement can be achieved by combining the following two enterprise integration patterns:
- Guaranteed Delivery
The Guaranteed Delivery pattern guarantees that a message will eventually be delivered to a receiver, even if there are temporary failures in the messaging system. However, because of the possibility of redeliveries, this pattern can result in a message being delivered multiple times.
- Idempotent Receiver
The Duplicate Message Suppression pattern addresses the issue of handling duplicate messages and ensures that if a component receives the same message multiple times, it processes it only once.
Read more here: Quality of Service Exactly Once
Summary
This lesson describes various integration patterns, including Aggregator, Composed Message Processor, Content-Based Routing, Content Enricher, Content Filter, Message Filter, Recipient List, Resequencer, Scatter-Gather, Splitter, and Quality of Service Exactly Once.