Batch interval (BATCHINT)
This attribute is a period, in milliseconds, during which the channel keeps a batch open even if there are no messages on the transmission queue.
We can specify any number of milliseconds, from zero through 999 999 999. The default value is zero.
If we do not specify a batch interval, the batch closes when one of the following conditions is met:
- The number of messages specified in BATCHSZ have been sent.
- The number of bytes specified in BATCHLIM have been sent.
- The transmission queue is empty.
On channels with a light load, where the transmission queue frequently becomes empty, the effective batch size might be much smaller than BATCHSZ.
We can use the BATCHINT attribute to make your channels more efficient by reducing the number of short batches. Be aware, however, that we can slow down the response time, because batches last longer and messages remain uncommitted for longer.
If you specify a BATCHINT, batches close only when one of the following conditions is met:
- The number of messages specified in BATCHSZ have been sent.
- The number of bytes specified in BATCHLIM have been sent.
- There are no more messages on the transmission queue and a time interval of BATCHINT has elapsed while waiting for messages (since the first message of the batch was retrieved).
Note: BATCHINT specifies the total amount of time that is spent waiting for messages. It does not include the time spent retrieving messages that are already available on the transmission queue, or the time spent transferring messages. This attribute is valid for channel types of:
- Sender
- Server
- Cluster sender
- Cluster receiver
Parent topic: Channel attributes in alphabetical order