Configuring and Managing the WebLogic Messaging Bridge
The main objective when tuning a messaging bridge is to improve overall messaging performance. Raw speed, though important, is only one of several performance-related factors. Other performance factors include reliability, scalability, manageability, monitoring, user transactions, message-driven bean support, and integration with an application server.
Asynchronous Mode Enabled attribute is set to false and the quality of service is Exactl
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 Administration Console Online Help.
When the Asynchronou
s Mode Enabled attribute is set to false and the quality of service is
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 Administration Console Online Help.
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
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 Administration Console Online Help.
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 Administration Console Online Help.
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:
weblogic.jms.MessagingBridgeclass. See Understanding Work Managers in Designing and Configuring WebLogic Server Environments.
Thread Pool Sizeproperty in the Messaging Bridge Configuration section on the Configuration: Services page for a server instance. To avoid competing with the default execute thread pool in the server, messaging bridges share a separate thread pool. This thread pool is used only in synchronous mode (Asynchronou
s Mode Enabled is not set). In asynchronous mode the bridge runs in a thread created by the JMS provider for the source destination. Deprecated in WebLogic Server 9.0.
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 Administration Console Online Help.
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.
Asynchronous Mode Enabled attribute determines whether the messaging bridge receives messages asynchronously using the JMS
MessageListener interface, 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 5-1:
See Configure messaging bridge instances in Administration Console Online 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.
In situations where a quality of service of Exactly-once is not required, the source destination can pipeline multiple messages. If an application uses asynchronous consumers (such as MDBs), consider increasing the WebLogic JMS Connection Factory's configured
MessagesMaximum value. See "Tuning MessageMaximum" in WebLogic Server Performance and Tuning.
If the asynchronous pipeline size is already set to 1, this may indicate that the application has enabled ordered redelivery, which in turn means that the pipeline must not be increased. See "Ordered Redelivery of Messages" in Programming WebLogic JMS.