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.
- 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:
-
a processor or output module instance is not able to process log data at the incoming rate,
-
that module instance’s log queue becomes full, and
-
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.
-
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.