Sending and Receiving Large Segmented Messages Using Parallel Processing

This section discusses how to:

  • Use the OnPreNotify and OnPostNotify PeopleCode events.

  • Using the bulk load handler to process large message segments in parallel.

  • Select the unordered segments option on the Routings-Routings Definition page.

  • Assign service operations to long-running event queues.

Using parallel processing to send and receive asynchronous service operations that contain large message segments increases integration through-put time.

In sequential processing service operations are processed in order, where the processing of one message must complete before the next message in the queue is processed. In parallel processing, messages are processed in unordered queues, as resources are available for processing.

You can improve system performance and processing times by performing any of these actions.

  • Use the OnPreNotify and OnPostNotify PeopleCode events.

  • Use the Bulk Load Handler.

  • Select the Unordered Segments option on the Routings–Routing Definition page.

  • Load balance these types of service operations using long-running event queues.

The only option you must set to send and receive segmented messages using parallel processing is the Unordered Segments option on the Routings–Routing Definitions page. The other options discussed in this section enhance the processing of these types of service operations.

The OnPreNotify and OnPostNotify service operation handler events enable you to perform pre- and post-processing actions on a service operation.

Use the OnPreNotify event to perform high-level pre-processing on data. Typically, this event is used to truncate the database table(s) if a destructive load, versus an update, is required. Note that you cannot use this event to modify actual message data.

Use the OnPostNotify event to perform actions such as start an application engine program, send an email message to indicate the transaction has been completed, and so on.

When implemented, the Broker handler first processes the OnPreNotify PeopleCode event. Then, the system creates one subscription contract for each message segment. The system processes the subscription contracts in parallel, except for the OnPostNotify contract. The OnPostNotify contract runs only after all subscription contract(s) are completed .

Using the bulk load handler is a good option when you are processing large messages and large message segments.

The Bulk Load Handler page (IB_SERVICEHDL5_SEC) used to configure a bulk load handler has a field called Truncate Table(s) that provides the option to truncate or not truncate tables. When using the OnPreNotify or OnPostNotify events, clear the Truncate Table(s) option so that tables are not truncated.

The Routings – Routings Definition page (IB_ROUTINGDEFN) features an Unordered Segments option. The option appears only when working with an inbound routing definition for an asynchronous service operation. To access the page select PeopleTools > Integration Broker > Integration Setup > Routings.

Image: Routings – Routing Definitions page

This example illustrates the Routings – Routing Definitions page.

Routings - Routing Definitions page

The Unordered Segments option appears to the right of the Receiver Node field. When you select the Unordered Segments option for an inbound routing definition, the system creates a subscription contract for each segment and processes the contracts in parallel.

For better performance and through-put times, you can load balance the processing of service operations that contain large segmented messages by assigning them to long-running event queues.

Setting up master-slave load balancing for long-running events is described elsewhere in the product documentation.

See Implementing Master-Slave Dispatchers