If you have been wondering how to avoid making mistakes and how to overcome the common gotchas when designing and developing message flows, you are not alone. But I have good news for you! WebSphere Message Broker V7 now offers you pre-defined solutions called "Patterns" for the common recurring problems. You do not have to be an expert in WebSphere Message Broker V7 to make use of these solutions to solve your problems!
What is a Pattern?
A pattern is a fully-developed reusable solution that can be altered or used as-is to address the most common design and architecture tasks. Patterns were built keeping in mind the most common usage and implementation solutions for WebSphere Message Broker application. They are geared to the inexperienced users of Message Broker technology who are challenged by questions such as:
- How do I learn to develop more efficient message flows?
- What are the best practices of implementing a message flow design?
- How do I prevent making mistakes when designing and developing message flows?
Why use Patterns?
- Patterns are generated from a set of predefined templates; therefore in addition to providing guidance for implementing a solution, they also optimize development efficiency by avoiding basic programming errors. The end result is a high quality solution through the reuse of assets.
- These pre-supplied, fully developed solutions can be re-used or extended to simplify the creation of common solutions using best practices. Patterns are provided to encourage the use of best practices in message flow design that would prevent problems related to resource usage, performance, error handling, logging, database, and migration.
Where can you find Patterns?
The Message Broker Toolkit V7 Toolkit contains a Patterns Explorer that provides an inventory of key patterns available for solution generation, along with their detailed specifications.
You can get to Patterns Explorer by selecting "Start from Patterns" under "Projects > Quick Starts" section of the Broker Development view as shown in Figure 1 below:
The Patterns Explorer displays all the patterns available with the Message Broker install as shown in Figure 2 below:
The information in Patterns Explorer guides you to use a pattern suitable for your environment. For example, you might have a need for a solution where different types of IDocs coming from SAP system are processed by a message flow. The Patterns Explorer provides a pattern for SAP connectivity that can be used in this scenario.
Another scenario could be a requirement to integrate legacy applications with the newer service-oriented applications. The Patterns Explorer can guide you to a category of patterns called Service Façade for such an application.
Types of Patterns
WebSphere Message Broker V7 provides the following patterns:
Application Integration > SAP: Use this pattern to integrate applications with the SAP system in a structured way. SAP provides a range of business applications including customer relationship management (CRM), supply chain management (SCM), and product lifecycle management (PLM). SAP Integration with Message Broker enables the integration of SAP systems and applications across the enterprise.
File processing > Record distribution: The File Processing patterns makes use of File nodes and can be used for activities such as:
Message-based integration > Message Correlator:
- Transformation and translation of data that is held in files
- Shredding of files into multiple individual transaction records
- Routing of records
- Accumulation of records into target files
- Routing of entire files to specified locations and processors
- Routing of records within files to specified locations and processors
These patterns demonstrate the application of the conventional request-response scenario. Correlator pattern flows accept requests from many client applications on a single queue, and return responses to the correct clients.Message-based integration > Message Splitter:
This pattern can be used to solve the problems arising due to the processing of large XML messages. You can use the Message Splitter pattern to split a large XML message into smaller elements for processing by one or more targets.Service Enablement > Service Façade:
These patterns use the techniques for service enablement of traditional enterprise solutions. They represent the transition from traditional application integration into service-oriented architectures, allowing existing assets to be reused in the new style without requiring radical change. Service Virtualization > Service Proxy:
Service virtualization pattern can be used when you do not want the service requesting client to access the service directly. It implements a message flow that provides a proxy for the provider Web service and can also include logging and error handling capabilities.
Using a Pattern
The following steps can be used when using patterns:
- Choose and select the pattern in the "WebSphere Message Broker Toolkit > Patterns explorer".
- Click "Create new instance" button to create the project based on the selected pattern.
- Provide the Pattern instance name and select all the pattern parameters (depending on the particular pattern and on the options that you enable for that pattern). An example of a pattern parameter is a queue name from where messages are read.
- Select "Generate" to create a pattern instance project, which is a Message Broker project that contains a pattern instance configuration file, HTML summary file, message flow and associated artifacts. The configuration file stores the pattern parameters that you configured. The summary file can be used to see if any additional tasks are required, such as creating queues or other parameters.
- Create a Broker Archive (BAR) file and assign the generated projects to it.
- Deploy the BAR file and test the message flow.
For an example of Pattern usage, see developerWorks article Introduction to patterns in WebSphere Message Broker V7.
For more information and details on the new features in WebSphere Message Broker V7, see Patterns in the WebSphere Message Broker information center and the Redbooks publication Connecting Your Business Using IBM WebSphere Message Broker V7 as an ESB.
I hope this information is helpful in planning your upgrade to WebSphere Message Broker V7. Let me know if you have any questions.