Higher throughput is usually achieved by making a small number of large writes to the transport instead of doing a large number of small writes. For example, writing one 6000-byte buffer is generally more efficient than writing 1000 six-byte buffers. To achieve higher efficiencies, the Enterprise Message API employs the concept of a high-water mark. When the application callssubmit , the Enterprise Message API does not always immediately pass the buffer to the transport; instead, the Enterprise Message API passes data to the transport after the size of its buffer reaches the high-water mark.
For example, assume a high-water mark of 6144 bytes. If an application, creates a message, encodes 500 bytes of content, and passes this to submit, the high-water mark will be triggered after thirteen buffers. At that point, the Enterprise Message API’s output queue will contain thirteen buffers, each with approximately 500 bytes that it can pass to the underlying transport, instead of passing one at a time.
You can configure each individual connection’s high-water mark.
Note the throughput and latency implications. Balance the use of the high-water mark and flush by Enterprise Message API accordingly:
• In high-throughput situations, it is better to make large writes to achieve higher efficiencies (i.e., in this case use the high-water mark).
• In low-throughput situations, data might linger in Enterprise Message API queues for longer periods and thus incur latency.