book
Article ID: KB0086821
calendar_today
Updated On:
Description
Resolution:
The following are the queue properties that will limit the queue's growth.
1) Topics and queues can specify the maxbytes property in the form:
maxbytes=value[KB|MB|GB]
For queues, maxbytes defines the maximum size (in bytes) that the queue can store, summed over all
messages in the queue. Should this limit be exceeded, messages will be rejected by the server and the
message producer send calls will return an error (see also overflowPolicy). For example, if a receiver
is off-line for a long time, then the queue size could reach this limit, which would prevent further memory
allocation for additional messages. If maxbytes is zero, or is not set, the server does not limit the memory
allocation for the queue.
2) Topics and queues can specify the maxmsgs property in the form:
maxmsgs=value
where value defines the maximum number of messages that can be waiting in a queue. When adding a
message would exceed this limit, the server does not accept the message into storage, and the message
producer’s send call returns an error (but see also overflowPolicy). If maxmsgs is zero, or is not set, the
server does not limit the number of messages in the queue.
3) flowControl
The flowControl property specifies the target maximum size the server can use to store pending messages
for the destination. Should the number of messages exceed the maximum, the server will slow down the
producers to the rate required by the message consumers. This is useful when message producers send
messages much more quickly than message consumers can consume them. Unlike the behavior established
by the overflowPolicy property, flowControl never discards messages or generates errors back to producer.
4) max_msg_memory from tibemsd.conf file.
max_msg_memory = size [KB|MB|GB]
Maximum memory the server can use for messages. This parameter lets you limit the memory that the server
uses for messages, so server memory usage cannot grow beyond the system’s memory capacity.
When msg_swapping is enabled, and messages overflow this limit, the server begins to swap messages
from process memory to disk. Swapping allows the server to free process memory for incoming messages,
and to process message volume in excess of this limit. When the server swaps a message to disk, a small
record of the swapped message remains in memory. If all messages are swapped out to disk, and their remains
still exceed this memory limit, then the server has no room for new incoming messages. The server stops accepting new messages, and send calls in message producers result in an error. (This situation probably indicates either a very low value for this parameter, or a very high message volume.)
Issue/Introduction
What are the configuration parameters can limit the growth of the queue?