The flow_control parameter in
tibemsd.conf enables and disables flow control globally for the EMS server. When
flow_control is
disabled (the default setting), the server does not enforce any flow control on destinations. When
flow_control is
enabled, the server enforces any flow control settings specified for each destination. See
Chapter 7, Using the Configuration Files for more information about working with configuration parameters.
When you wish to control the flow of messages on a destination, set the flowControl property on that destination. The
flowControl property specifies the target maximum size of stored pending messages for the destination. The size specified is in bytes, unless you specify the units for the size. You can specify KB, MB, or GB for the units. For example,
flowControl = 60MB specifies the target maximum storage for pending messages for a destination is 60 Megabytes.
The value specified for the flowControl property on a destination is a target maximum for pending message storage. When flow control is enabled, the server may use slightly more or less storage before enforcing flow control, depending upon message size, number of message producers, and other factors. Setting the
flowControl property on a destination but specifying no value causes the server to use a default value of 256KB.
When the storage for pending messages is near the specified limit, the server blocks all new calls to send a message from message producers. The calls do not return until the storage has decreased below the specified limit, or the flowControl limit is increased. Once message consumers have received messages and the pending message storage goes below the specified limit, the server allows the
send message calls to return to the caller and the message producers can continue processing.
If a multicast channel exceeds its maximum transmission rate, as determined by the maxrate of the channel definition in the
channels.conf configuration file, the server may develop a backlog of messages. If
flow_control parameter in the
tibemsd.conf file is disabled, these messages are buffered in the server until they can be sent over multicast. The channel backlog can be determined using the
show channel command in the administration tool, or through the
ChannelInfo object in the administration API.
When the flow_control parameter is enabled, the EMS server checks for backlog before sending a response to the message producers publishing to multicast-enabled topics. If a message backlog exists, the server delays sending a response to the message producer until the backlog has been cleared. This causes the message producer to decrease the rate at which it sends messages to the topic.
If the flowControl property is set on the topic on the server receiving the messages, when the pending message size limit is reached, messages are not forwarded by way of the route until the topic subscriber receives enough messages to lower the pending message size below the specified limit.
If the flowControl property is set on the topic on the server sending the messages, the server may block any topic publishers when sending new messages if messages cannot be sent quickly enough by way of the route. This could be due to network latency between the routed servers or it could be because flow control on the other server is preventing new messages from being sent.