This subsection describes the controlling of the message flow rate.
During the sending and receiving of messages using Cosminexus JMS Provider, apart from the messages sent from the producer to the consumer, the control messages used by Cosminexus JMS Provider are also sent and received. The sending and receiving of these messages has a mutual impact. For example, in the cases such as when the authorization of the CJMSP Broker acknowledgement is delayed for the messages sent from the producer to the consumer, the sending and receiving of control messages is also delayed, and the entire system performance deteriorates.
By controlling the flow rate of these messages from the connection point of view, you can enhance the reliability of sending and receiving messages and improve the system performance.
With Cosminexus JMS Provider, you can limit the flow rate of the messages sent to each consumer in order to control the message flow rate.
For example, when the messages are being sent and received using the PTP messaging model, if the processing speed of each consumer is low, the messages delivered to each consumer are limited. Due to this, the processing is executed with the round robin method using multiple consumers, enabling you to improve the performance of the entire system. Determine an appropriate value for the message flow rate for consumers considering the relationship with the increased overhead of distributing and delivering the messages to multiple consumers.
Set the limit value for consumers (consumerFlowLimit) using the cjmsicmd create dst command at each destination. For the command details, see cjmsicmd create dst (Creating the physical destinations) in the uCosminexus Application Server Command Reference Guide. Note that you must set the consumerFlowLimit value considering the relationship with the number of concurrent executions (maximum number of pool instances) of the Message-driven Beans running on the consumer. The examples of specified patterns are as follows:
The following figure provides an overview of the flow rate control based on the consumerFlowLimit settings.
Figure 7-9 Overview of the flow rate control based on the consumerFlowLimit settings
In this example, as the limit value for consumers, consumerFlowLimit is set to '10', when the producer sends 12 messages, the limit value 10 messages are sent from the destination to consumer1, and the remaining messages are sent to consumer2. With each consumer, the processing is executed using threads no more than the number specified with the maximum number of Message-driven Bean instances.