Best Practices Using UOO and Distributed Destinations Migrating Old Applications to Use UOO

14-20 Performance and Tuning for Oracle WebLogic Server

14.15 Tuning Applications Using Unit-of-Order

Message Unit-of-Order is a WebLogic Server value-added feature that enables a stand-alone message producer, or a group of producers acting as one, to group messages into a single unit with respect to the processing order a sub-ordering. This single unit is called a Unit-of-Order or UOO and requires that all messages from that unit be processed sequentially in the order they were created. UOO replaces the following complex design patterns: ■ A dedicated consumer with a unique selector per each sub-ordering ■ A new destination per sub-ordering, one consumer per destination. See Using Message Unit-of-Order in Programming JMS for Oracle WebLogic Server.

14.15.1 Best Practices

The following sections provide best practice information when using UOO: ■ Ideal for applications that have strict message ordering requirements. UOO simplifies administration and application design, and in most applications improves performance. ■ Use MDB batching to: – Speed-up processing of the messages within a single sub-ordering. – Consume multiple messages at a time under the same transaction. See Chapter 11, Tuning Message-Driven Beans . ■ You can configure a default UOO for the destination. Only one consumer on the destination processes messages for the default UOO at a time.

14.15.2 Using UOO and Distributed Destinations

To ensure strict ordering when using distributed destinations, each different UOO is pinned to a specific physical destination instance. There are two options for automatically determining the correct physical destination for a given UOO: ■ Hashing – Is generally faster and the UOO setting. Hashing works by using a hash function on the UOO name to determine the physical destination. It has the following drawbacks: – It doesnt correctly handle the administrative deleting or adding physical destinations to a distributed destination. – If a UOO hashes to an unavailable destination, the message send fails. ■ Path Service – Is a single server UOO directory service that maps the physical destination for each UOO. The Path Service is generally slower than hashing if there are many differently named UOO created per second. In this situation, each new UOO name implicitly forces a check of the path service before sending the message. If the number of UOOs created per second is limited, Path Service performance is not an issue as the UOO paths are cached throughout the cluster.

14.15.3 Migrating Old Applications to Use UOO

For releases prior to WebLogic Server 9.0, applications that had strict message ordering requirements were required to do the following: ■ Use a single physical destination with a single consumer Tuning WebLogic JMS 14-21 ■ Ensure the maximum asynchronous consumer message backlog The MessagesMaximum parameter on the connection factory was set to a value of 1. UOO relaxes these requirements significantly as it allows for multiple consumers and allows for a asynchronous consumer message backlog of any size. To migrate older applications to take advantage of UOO, simply configure a default UOO name on the physical destination. See Configure connection factory unit-of-order parameters in Oracle WebLogic Server Administration Console Help and Ordered Redelivery of Messages in Programming JMS for Oracle WebLogic Server.

14.16 Using One-Way Message Sends