public class OutputBufferProcessor extends Object implements com.lmax.disruptor.WorkHandler<MessageEvent>
| Constructor and Description |
|---|
OutputBufferProcessor(Configuration configuration,
com.codahale.metrics.MetricRegistry metricRegistry,
ServerStatus serverStatus,
OutputRouter outputRouter,
MessageOutput defaultMessageOutput) |
| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(MessageEvent event)
Each message will be written to one or more outputs.
|
@Inject public OutputBufferProcessor(Configuration configuration, com.codahale.metrics.MetricRegistry metricRegistry, ServerStatus serverStatus, OutputRouter outputRouter, MessageOutput defaultMessageOutput)
public void onEvent(MessageEvent event) throws Exception
The default output is always being used for every message, but optionally the message can be routed to additional outputs, currently based on the stream outputs that are configured in the system.
The stream outputs are time limited so one bad output does not impact throughput too much. Essentially this means that the work of writing to the outputs is performed, but the writer threads will not wait forever for stream outputs to finish their work. This might lead to increased memory usage!
The default output, however, is allowed to block and is not subject to time limiting. This is important because it can exert back pressure on the processing pipeline this way, making sure we don't run into excessive heap usage.
onEvent in interface com.lmax.disruptor.WorkHandler<MessageEvent>event - the message to write to outputsExceptionCopyright © 2012-2016 Graylog, Inc.. All Rights Reserved.