Return to
Portfolio

3.3. Buffering and Flow Control

NXLog implements several buffering features. Of these, two are particularly important and are enabled by default: log queues and flow control.

Log Queues

Every processor and output module instance has an input log queue for events that have not yet been processed by that module instance. When the preceding module has processed an event, it is placed in this queue. Log queues are enabled by default for all processor and output module instances; adjusting log queue sizes is the preferred way to control buffering behavior.

diag d29522d7e67540d0e54c3cf122084ed6
Flow Control

NXLog’s flow control functionality provides automatic, zero-configuration handling of many cases where buffering would otherwise be required. Flow control takes effect when the following sequence of events occurs in a route:

  1. a processor or output module instance is not able to process log data at the incoming rate,

  2. that module instance’s log queue becomes full, and

  3. the preceding input or processor module instance has flow control enabled (which is the default).

In this case, flow control will cause the input or processor module instance to suspend processing until the succeeding module instance is ready to accept more log data.

diag 4c363452ab62c980f13415f522a4af26

For more information about these and other buffering features, including log queue persistence, disabling flow control, read/write buffers, and examples for specific scenarios, see Using Buffers.