Chapter 9. Broker solutions using WebSphere Business Integration Message Broker 237
򐂰 The AggregateReply node marks the end of an aggregation fan-in. It collects
replies and combines them into a single aggregated reply message.
An aggregation message flow will most likely contain Compute nodes using
ESQL scripts to implement logic needed during the fan-out or fan-in process. In
particular, Compute nodes are handy for manipulation of the aggregated reply
before returning it to the client. Message flows can also interact with external
databases to store or retrieve information needed during processing.
When determining whether to use aggregation, keep the following considerations
in mind:
1. Message flows using aggregation are generally the most complex message
flows to be constructed.
2. In production you would want the fan-out and fan-in flows to be in two
different message flows. This allows the input flow to be stopped first while
allowing inflight requests to complete before the fan-in flow is stopped.
3. Good design is necessary to ensure that all fan-out and fan-in messages are
captured and processed.
4. A good knowledge of ESQL and the logical message tree is necessary to
manipulate the combined messages.
9.5 System design overview
With the design guidelines in mind, ITSO Electronics decided to implement their
solution in three stages using WebSphere Business Integration Message Broker
V5 as the broker.
9.5.1 Stage 1: Internal “Get earliest delivery date” solution
In the first stage of the solution, the Retail department will use a broker to access
the internal Wholesale departments.
Figure 9-10 shows a high-level design view of the solution.
238 Broker Interactions for Intra- and Inter-enterprise
Figure 9-10 Aggregation design
The solution will consist of the following elements:
򐂰 A Retail application that requests delivery dates from Wholesale applications
using the part number as input. This application invokes a Web service in
order to get the delivery date.
򐂰 A message flow deployed on WebSphere Business Integration Message
Broker that distributes the request to all the Wholesale systems that can
provide that part. The message flow is built using aggregate nodes in order to
make the fact that there are multiple Wholesale systems transparent to the
client. The message flow will collect the responses from the Wholesale
systems, examine them to determine which date is the earliest, and send that
date back to the client.
This message flow is available to the client as a Web service.
򐂰 A Wholesale system that returns a delivery date for a part it contains in its
inventory. The application is implemented using an EJB and has been
Web-service enabled.
To simplify and standardize the access to the broker process, the WebSphere
MQ Web Services Transport features of WebSphere Business Integration
Message Broker will be used. The requests for delivery dates are non-critical to
the business and if a response is not received in a reasonable amount of time,
the request can be easily sent again.
In this scenario, we are combining two aspects of Web service support provided
by WebSphere Business Integration Message Broker:
򐂰 The message flow is available to clients as a Web service and is accessed
using HTTP.
Message Broker
<Aggregator>
Wholesale1
Wholesale2
Retailer
SOAP/
HTTP
SOAP/HTTP
<subflow>
<subflow>
Chapter 9. Broker solutions using WebSphere Business Integration Message Broker 239
򐂰 The message flow sends a message to a Web service to get a reply for the
client. This also uses the HTTP protocol.
The primary message flow uses the aggregator node to send the request to
multiple Wholesale systems. It is important to note that the aggregator node is
designed for MQ message input so in this stage you will see examples of
converting messages from one format to another.
9.5.2 Stage 2: Internal sales forecast publish/subscribe
Stage 2 will use a publish/subscribe model to allow the Retail systems to publish
their sales forecast information to large numbers of Wholesale system
subscribers (Figure 9-11).
Figure 9-11 Real-time flow design
The solution will consist of a publish/subscribe mechanism to allow the Retail
clients to distribute sales information to the Wholesale applications
Because a large number of messages need to be published and persistent
delivery is not required, this design will use the WebSphere MQ Real-time
Transport features of WebSphere Business Integration Message Broker.
9.5.3 Stage 3: External “Get earliest delivery date” solution
Stage 3 will extend the solution in stage 1 to allow the Retail departments to
access external Wholesale suppliers. The addition of a gateway will allow the
internal Retail departments to access the external Wholesale processes through
a standard interface (Figure 9-12).
Event Broker
Wholesale System
Wholesale System
Wholesale System
<Broker Real-time flow>
Retail System
JMS/IP
JMS/IP

Get Patterns: Broker Interactions for Intra- and Inter-enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.