Compressing Messages Oracle Fusion Middleware Online Documentation Library

Tuning WebLogic JMS 14-11

14.9.1 Tuning MessageMaximum Limitations

Tuning the MessagesMaximum value too high can cause: ■ Increased memory usage on the client. ■ Affinity to an existing client as its pipeline fills with messages. For example: If MessagesMaximum has a value of 10,000,000, the first consumer client to connect will get all messages that have already arrived at the destination. This condition leaves other consumers without any messages and creates an unnecessary backlog of messages in the first consumer that may cause the system to run out of memory. ■ Packet is too large exceptions and stalled consumers. If the aggregate size of the messages pushed to a consumer is larger than the current protocols maximum message size default size is 10 MB and is configured on a per WebLogic Server instance basis using the console and on a per client basis using the -Dweblogic.MaxMessageSize command line property, the message delivery fails.

14.10 Setting Maximum Message Size for Network Protocols

You may need to configure WebLogic clients in addition to the WebLogic Server instances, when sending and receiving large messages. For most protocols, including T3, WLS limits the size of a network call to 10MB by default. If individual JMS message sizes exceed this limit, or if a set of JMS messages that is batched into the same network call exceeds this limit, this can lead to either “packet too large exceptions” andor stalled consumers. Asynchronous consumers can cause multiple JMS messages to batch into the same network call, to control this batch size, see Section 14.9.1, Tuning MessageMaximum Limitations. To set the maximum message size on a server instance, tune the maximum message size for each supported protocol on a per protocol basis for each involved default channel or custom channel. In this context the word message refers to all network calls over the given protocol, not just JMS calls. To set the maximum message size on a client, use the following command line property: -Dweblogic.MaxMessageSize

14.11 Compressing Messages

A message compression threshold can be set programmatically using a JMS API extension to the WLMessageProducer interface, or administratively by either specifying a Default Compression Threshold value on a connection factory or on a JMS SAF remote context. Compressed messages may actually inadvertently affect destination quotas since some message types actually grow larger when compressed For instructions on configuring default compression thresholds using the Administration Console, see: ■ Connection factories — Configure default delivery parameters in the Oracle WebLogic Server Administration Console Help. Note: This setting applies to all WebLogic Server network packets delivered to the client, not just JMS related packets. 14-12 Performance and Tuning for Oracle WebLogic Server ■ Store-and-Forward SAF remote contexts — Configure SAF remote contexts in the Oracle WebLogic Server Administration Console Help. Once configured, message compression is triggered on producers for client sends, on connection factories for message receives and message browsing, or through SAF forwarding. Messages are compressed using GZIP. Compression only occurs when message producers and consumers are located on separate server instances where messages must cross a JVM boundary, typically across a network connection when WebLogic domains reside on different machines. Decompression automatically occurs on the client side and only when the message content is accessed, except for the following situations: ■ Using message selectors on compressed XML messages can cause decompression, since the message body must be accessed in order to filter them. For more information on defining XML message selectors, see Filtering Messages in Programming JMS for Oracle WebLogic Server. ■ Interoperating with earlier versions of WebLogic Server can cause decompression. For example, when using the Messaging Bridge, messages are decompressed when sent from the current release of WebLogic Server to a receiving side that is an earlier version of WebLogic Server. On the server side, messages always remains compressed, even when they are written to disk.

14.12 Paging Out Messages To Free Up Memory