Package org.graylog2.buffers.processors
Class OutputBufferProcessor
java.lang.Object
org.graylog2.buffers.processors.OutputBufferProcessor
- All Implemented Interfaces:
com.lmax.disruptor.WorkHandler<MessageEvent>
public class OutputBufferProcessor
extends Object
implements com.lmax.disruptor.WorkHandler<MessageEvent>
-
Constructor Summary
ConstructorDescriptionOutputBufferProcessor
(Configuration configuration, com.codahale.metrics.MetricRegistry metricRegistry, ServerStatus serverStatus, OutputRouter outputRouter, MessageOutput defaultMessageOutput) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onEvent
(MessageEvent event) Each message will be written to one or more outputs.
-
Constructor Details
-
OutputBufferProcessor
@Inject public OutputBufferProcessor(Configuration configuration, com.codahale.metrics.MetricRegistry metricRegistry, ServerStatus serverStatus, OutputRouter outputRouter, MessageOutput defaultMessageOutput)
-
-
Method Details
-
onEvent
Each message will be written to one or more outputs.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.
- Specified by:
onEvent
in interfacecom.lmax.disruptor.WorkHandler<MessageEvent>
- Parameters:
event
- the message to write to outputs- Throws:
Exception
-