Package org.graylog2.buffers.processors
Class OutputBufferProcessor
java.lang.Object
org.graylog2.buffers.processors.OutputBufferProcessor
- All Implemented Interfaces:
WorkHandler<MessageEvent>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionOutputBufferProcessor(Configuration configuration, com.codahale.metrics.MetricRegistry globalMetricRegistry, ServerStatus serverStatus, OutputRouter outputRouter, MessageOutput defaultMessageOutput, int processorOrdinal) -
Method Summary
Modifier and TypeMethodDescriptionvoidonEvent(MessageEvent event) Each message will be written to one or more outputs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graylog2.shared.buffers.WorkHandler
onShutdown, onStart
-
Constructor Details
-
OutputBufferProcessor
@Inject public OutputBufferProcessor(Configuration configuration, com.codahale.metrics.MetricRegistry globalMetricRegistry, ServerStatus serverStatus, OutputRouter outputRouter, MessageOutput defaultMessageOutput, int processorOrdinal)
-
-
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:
onEventin interfaceWorkHandler<MessageEvent>- Parameters:
event- the message to write to outputs- Throws:
Exception
-