Skip Headers
Oracle® Fusion Middleware Performance and Tuning for Oracle WebLogic Server
11g Release 1 (10.3.6)

Part Number E13814-08
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

16 Tuning WebLogic Message Bridge

This chapter provides information on various methods to improve message bridge performance.

Best Practices

Changing the Batch Size

When the Asynchronous Mode Enabled attribute is set to false and the quality of service is Exactly-once, the Batch Size attribute can be used to reduce the number of transaction commits by increasing the number of messages per transaction (batch). The best batch size for a bridge instance depends on the combination of JMS providers used, the hardware, operating system, and other factors in the application environment. See "Configure transaction properties" in Oracle WebLogic Server Administration Console Help.

Changing the Batch Interval

When the Asynchronous Mode Enabled attribute is set to false and the quality of service is Exactly-once, the BatchInterval attribute is used to adjust the amount of time the bridge waits for each batch to fill before forwarding batched messages. The best batch interval for a bridge instance depends on the combination of JMS providers used, the hardware, operating system, and other factors in the application environment. For example, if the queue is not very busy, the bridge may frequently stop forwarding in order to wait batches to fill, indicating the need to reduce the value of the BatchInterval attribute. See "Configure transaction properties" in Oracle WebLogic Server Administration Console Help.

Changing the Quality of Service

An Exactly-once quality of service may perform significantly better or worse than At-most-once and Duplicate-okay.

When the Exactly-once quality of service is used, the bridge must undergo a two-phase commit with both JMS servers in order to ensure the transaction semantics and this operation can be very expensive. However, unlike the other qualities of service, the bridge can batch multiple operations together using Exactly-once service.

You may need to experiment with this parameter to get the best possible performance. For example, if the queue is not very busy or if non-persistent messages are used, Exactly-once batching may be of little benefit. See "Configure messaging bridge instances" in Oracle WebLogic Server Administration Console Help.

Using Multiple Bridge Instances

If message ordering is not required, consider deploying multiple bridges.

Multiple instances of the bridge may be deployed using the same destinations. When this is done, each instance of the bridge runs in parallel and message throughput may improve. If multiple bridge instances are used, messages will not be forwarded in the same order they had in the source destination. See "Create messaging bridge instances" in Oracle WebLogic Server Administration Console Help.

Consider the following factors when deciding whether to use multiple bridges:

Changing the Thread Pool Size

A general bridge configuration rule is to provide a thread for each bridge instance targeted to a server instance. Use one of the following options to ensure that an adequate number of threads is available for your environment:

Avoiding Durable Subscriptions

If the bridge is listening on a topic and it is acceptable that messages are lost when the bridge is not forwarding messages, disable the Durability Enabled flag to ensure undeliverable messages do not accumulate in the source server's store. Disabling the flag also makes the messages non-persistent. See "Configure messaging bridge instances" in Oracle WebLogic Server Administration Console Help.

Co-locating Bridges with Their Source or Target Destination

If a messaging bridge source or target is a WebLogic destination, deploy the bridge to the same WebLogic server as the destination. Targeting a messaging bridge with one of its destinations eliminates associated network and serialization overhead. Such overhead can be significant in high-throughput applications, particularly if the messages are non-persistent.

Changing the Asynchronous Mode Enabled Attribute

The Asynchronous Mode Enabled attribute determines whether the messaging bridge receives messages asynchronously using the JMS MessageListener interface at http://docs.oracle.com/javaee/5/api/javax/jms/MessageListener.html, or whether the bridge receives messages using the synchronous JMS APIs. In most situations, the Asynchronous Enabled attributes value is dependent on the QOS required for the application environment as shown in Table 16-1:

Table 16-1 Asynchronous Mode Enabled Values for QOS Level

QOS Asynchronous Mode Enabled Attribute value

Exactly-onceFoot 1 

false

At-least-once

true

At-most-once

true


Footnote 1 If the source destination is a non-WebLogic JMS provider and the QOS is Exactly-once, then the Asynchronous Mode Enabled attribute is disabled and the messages are processed in synchronous mode.

See "Configure messaging bridge instances" in Oracle WebLogic Server Administration Console Help.

A quality of service of Exactly-once has a significant effect on bridge performance. The bridge starts a new transaction for each message and performs a two-phase commit across both JMS servers involved in the transaction. Since the two-phase commit is usually the most expensive part of the bridge transaction, as the number of messages being processed increases, the bridge performance tends to decrease.