Search in sources :

Example 1 with BlockingBatchedESOutput

use of org.graylog2.outputs.BlockingBatchedESOutput in project graylog2-server by Graylog2.

the class BatchedElasticSearchOutputFlushThread method doRun.

@Override
public void doRun() {
    LOG.debug("Checking for outputs to flush ...");
    for (MessageOutput output : outputRegistry.getMessageOutputs()) {
        if (output instanceof BlockingBatchedESOutput) {
            try {
                LOG.debug("Flushing output <{}>", output);
                ((BlockingBatchedESOutput) output).forceFlushIfTimedout();
            } catch (Exception e) {
                LOG.error("Caught exception while trying to flush output: {}", e);
            }
        }
    }
}
Also used : MessageOutput(org.graylog2.plugin.outputs.MessageOutput) BlockingBatchedESOutput(org.graylog2.outputs.BlockingBatchedESOutput)

Aggregations

BlockingBatchedESOutput (org.graylog2.outputs.BlockingBatchedESOutput)1 MessageOutput (org.graylog2.plugin.outputs.MessageOutput)1